summaryrefslogtreecommitdiffstats
path: root/test/vfd.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-09-16 12:42:20 (GMT)
committerGitHub <noreply@github.com>2021-09-16 12:42:20 (GMT)
commit1f2bba5255014465a319750e2ba712ebb70eee74 (patch)
treec87689592004808410b589cee3b4740259535486 /test/vfd.c
parent1c892fb41fb5439d3b4a69fd3cd9d25e4aa2ee6e (diff)
downloadhdf5-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 'test/vfd.c')
-rw-r--r--test/vfd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/vfd.c b/test/vfd.c
index 8484bfd..f4cb988 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -859,7 +859,7 @@ error:
* 'first_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF("format-nonliteral")
+H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
@@ -924,7 +924,7 @@ test_family_opens(char *fname, hid_t fa_pl)
error:
return -1;
} /* end test_family_opens() */
-H5_GCC_DIAG_ON("format-nonliteral")
+H5_GCC_CLANG_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: test_family
@@ -1150,7 +1150,7 @@ error:
* 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF("format-nonliteral")
+H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_family_compat(void)
{
@@ -1236,7 +1236,7 @@ error:
return -1;
} /* end test_family_compat() */
-H5_GCC_DIAG_ON("format-nonliteral")
+H5_GCC_CLANG_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: test_family_member_fapl
@@ -1376,7 +1376,7 @@ error:
* 'sf_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF("format-nonliteral")
+H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
static herr_t
test_multi_opens(char *fname)
{
@@ -1396,7 +1396,7 @@ test_multi_opens(char *fname)
return (fid >= 0 ? FAIL : SUCCEED);
} /* end test_multi_opens() */
-H5_GCC_DIAG_ON("format-nonliteral")
+H5_GCC_CLANG_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
* Function: test_multi