summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDF5_Process_Flex_Files.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2020-10-06 16:56:59 (GMT)
committerGitHub <noreply@github.com>2020-10-06 16:56:59 (GMT)
commitc0e087a65a2f1ab354d3016bc29262eeec722d6f (patch)
treef01a0153167d084012568904bf8ca5a591ec1444 /config/cmake/HDF5_Process_Flex_Files.cmake
parent2384233b73921a2e1754d04141d9d6d54451ec26 (diff)
downloadhdf5-c0e087a65a2f1ab354d3016bc29262eeec722d6f.zip
hdf5-c0e087a65a2f1ab354d3016bc29262eeec722d6f.tar.gz
hdf5-c0e087a65a2f1ab354d3016bc29262eeec722d6f.tar.bz2
Fix VFD h5repacktest (#20)
* h5repacktest VFD fix and formatting changes * Fix memory leak in H5PL__find_plugin_in_path When encountering a directory, the current loop iteration was skipped without freeing the memory allocated for the path. * Refactor parser GCC diagnostic statements * genparser on jelly with default bison/flex Co-authored-by: Michael Kuhn <michael.kuhn@ovgu.de>
Diffstat (limited to 'config/cmake/HDF5_Process_Flex_Files.cmake')
-rw-r--r--config/cmake/HDF5_Process_Flex_Files.cmake24
1 files changed, 20 insertions, 4 deletions
diff --git a/config/cmake/HDF5_Process_Flex_Files.cmake b/config/cmake/HDF5_Process_Flex_Files.cmake
index 2595c39..9445545 100644
--- a/config/cmake/HDF5_Process_Flex_Files.cmake
+++ b/config/cmake/HDF5_Process_Flex_Files.cmake
@@ -35,21 +35,29 @@ if (FILE_PARSE)
# will simply ignore them, but we want to avoid those warnings.
file (READ ${FILE_PARSE}.c TEST_STREAM)
file (WRITE ${FILE_PARSE}.c "
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2\n
+#if defined __GNUC__
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402\n
#pragma GCC diagnostic ignored \"-Wconversion\"\n
#pragma GCC diagnostic ignored \"-Wimplicit-function-declaration\"\n
#pragma GCC diagnostic ignored \"-Wlarger-than=\"\n
#pragma GCC diagnostic ignored \"-Wmissing-prototypes\"\n
#pragma GCC diagnostic ignored \"-Wnested-externs\"\n
#pragma GCC diagnostic ignored \"-Wold-style-definition\"\n
+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n
#pragma GCC diagnostic ignored \"-Wsign-compare\"\n
#pragma GCC diagnostic ignored \"-Wsign-conversion\"\n
+#pragma GCC diagnostic ignored \"-Wstrict-overflow\"\n
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"\n
+#pragma GCC diagnostic ignored \"-Wsuggest-attribute=const\"\n
+#pragma GCC diagnostic ignored \"-Wsuggest-attribute=pure\"\n
#pragma GCC diagnostic ignored \"-Wswitch-default\"\n
#pragma GCC diagnostic ignored \"-Wunused-function\"\n
#pragma GCC diagnostic ignored \"-Wunused-macros\"\n
#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n
-#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n
+#endif\n
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600\n
+#pragma GCC diagnostic ignored "-Wnull-dereference"\"\n
+#endif\n
#elif defined __SUNPRO_CC\n
#pragma disable_warn\n
#elif defined _MSC_VER\n
@@ -69,21 +77,29 @@ if (FILE_ANALYZE)
# will simply ignore them, but we want to avoid those warnings.
file (READ ${GEN_DIR}/${FILE_ANALYZE} TEST_STREAM)
file (WRITE ${FILE_ANALYZE} "
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2\n
+#if defined __GNUC__
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402\n
#pragma GCC diagnostic ignored \"-Wconversion\"\n
#pragma GCC diagnostic ignored \"-Wimplicit-function-declaration\"\n
#pragma GCC diagnostic ignored \"-Wlarger-than=\"\n
#pragma GCC diagnostic ignored \"-Wmissing-prototypes\"\n
#pragma GCC diagnostic ignored \"-Wnested-externs\"\n
#pragma GCC diagnostic ignored \"-Wold-style-definition\"\n
+#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n
#pragma GCC diagnostic ignored \"-Wsign-compare\"\n
#pragma GCC diagnostic ignored \"-Wsign-conversion\"\n
+#pragma GCC diagnostic ignored \"-Wstrict-overflow\"\n
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"\n
+#pragma GCC diagnostic ignored \"-Wsuggest-attribute=const\"\n
+#pragma GCC diagnostic ignored \"-Wsuggest-attribute=pure\"\n
#pragma GCC diagnostic ignored \"-Wswitch-default\"\n
#pragma GCC diagnostic ignored \"-Wunused-function\"\n
#pragma GCC diagnostic ignored \"-Wunused-macros\"\n
#pragma GCC diagnostic ignored \"-Wunused-parameter\"\n
-#pragma GCC diagnostic ignored \"-Wredundant-decls\"\n
+#endif\n
+#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 600\n
+#pragma GCC diagnostic ignored "-Wnull-dereference"\"\n
+#endif\n
#elif defined __SUNPRO_CC\n
#pragma disable_warn\n
#elif defined _MSC_VER\n