diff options
author | Sean McBride <sean@rogue-research.com> | 2021-09-16 12:42:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-16 12:42:20 (GMT) |
commit | 1f2bba5255014465a319750e2ba712ebb70eee74 (patch) | |
tree | c87689592004808410b589cee3b4740259535486 /hl/src/H5LT.c | |
parent | 1c892fb41fb5439d3b4a69fd3cd9d25e4aa2ee6e (diff) | |
download | hdf5-1f2bba5255014465a319750e2ba712ebb70eee74.zip hdf5-1f2bba5255014465a319750e2ba712ebb70eee74.tar.gz hdf5-1f2bba5255014465a319750e2ba712ebb70eee74.tar.bz2 |
Modified gcc/clang warning suppression macros to account for some warnings flags being supported by one compiler but not the other (#379)
* Committing clang-format changes
* Fixed GCC warning suppression pragmas to also work with clang
H5_GCC_DIAG_ON remains gcc-only.
Added a new H5_CLANG_DIAG_ON that's clang-only, but it's not used anywhere currently.
Added a new H5_GCC_CLANG_DIAG_ON that works with both compilers, which afterall support mostly the same warnings. Changed almost all uses of H5_GCC_DIAG_ON to use H5_GCC_CLANG_DIAG_ON, with the exception of a couple, where they really were suppressing gcc-only warnings.
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r-- | hl/src/H5LT.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 0917044..8f2b33f 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1352,13 +1352,13 @@ find_dataset(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const * modify the op_data buffer (i.e.: dset_name) during the traversal, and the * library never modifies that buffer. */ -H5_GCC_DIAG_OFF("cast-qual") +H5_GCC_CLANG_DIAG_OFF("cast-qual") herr_t H5LTfind_dataset(hid_t loc_id, const char *dset_name) { return H5Literate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name); } -H5_GCC_DIAG_ON("cast-qual") +H5_GCC_CLANG_DIAG_ON("cast-qual") /*------------------------------------------------------------------------- * @@ -1945,13 +1945,13 @@ H5LTfind_attribute(hid_t loc_id, const char *attr_name) * modify the op_data buffer (i.e.: attr_name) during the traversal, and the * library never modifies that buffer. */ -H5_GCC_DIAG_OFF("cast-qual") +H5_GCC_CLANG_DIAG_OFF("cast-qual") herr_t H5LT_find_attribute(hid_t loc_id, const char *attr_name) { return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name); } -H5_GCC_DIAG_ON("cast-qual") +H5_GCC_CLANG_DIAG_ON("cast-qual") /*------------------------------------------------------------------------- * Function: H5LTget_attribute_ndims |