diff options
author | Sean <sean@rogue-research.com> | 2021-02-15 21:32:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 21:32:08 (GMT) |
commit | 2359a9b020761efd83b8a493b12f40b8a9696000 (patch) | |
tree | 9c44fd3edac28dd870f670f5817af9acf4066fee /hl/src | |
parent | 5c1ddd2d49edd8fa278380971cf22e0d3c6a0d78 (diff) | |
download | hdf5-2359a9b020761efd83b8a493b12f40b8a9696000.zip hdf5-2359a9b020761efd83b8a493b12f40b8a9696000.tar.gz hdf5-2359a9b020761efd83b8a493b12f40b8a9696000.tar.bz2 |
Fix clang unknown pragma warnings (#337)
Although clang defines __GNUC__ and supports most gcc warnings, it doesn't support all, and will in fact even warn about an unknown pragma.
Guard appropriately.
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5LTanalyze.c | 4 | ||||
-rw-r--r-- | hl/src/H5LTparse.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 4adf3d3..3c6983a 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -2,7 +2,6 @@ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wmissing-prototypes" #pragma GCC diagnostic ignored "-Wnested-externs" #pragma GCC diagnostic ignored "-Wold-style-definition" @@ -11,8 +10,11 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wstrict-overflow" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#if !defined (__clang__) +#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif #pragma GCC diagnostic ignored "-Wswitch-default" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-macros" diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index 80de0a2..2ef133f 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -2,7 +2,6 @@ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wmissing-prototypes" #pragma GCC diagnostic ignored "-Wnested-externs" #pragma GCC diagnostic ignored "-Wold-style-definition" @@ -11,8 +10,11 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wstrict-overflow" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#if !defined (__clang__) +#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif #pragma GCC diagnostic ignored "-Wswitch-default" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-macros" |