summaryrefslogtreecommitdiffstats
path: root/test/error_test.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-01-29 02:35:28 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:54 (GMT)
commit13bb3afdc6c6a947c7d4c768fe81a3eb29b0f254 (patch)
tree0a8511c35720f5b622d5c2b3790c6215da2839e2 /test/error_test.c
parent2badc1bf325cd6b9ff4962ce7b0e0296568f240e (diff)
downloadhdf5-13bb3afdc6c6a947c7d4c768fe81a3eb29b0f254.zip
hdf5-13bb3afdc6c6a947c7d4c768fe81a3eb29b0f254.tar.gz
hdf5-13bb3afdc6c6a947c7d4c768fe81a3eb29b0f254.tar.bz2
Reduce differences between my -Werror branch and `develop`:
Rename index -> idx, fileno -> fnumber, fileno -> fno to avoid GCC shadowed declaration warnings about index(3). Convert #pragma GCC diagnostic push/pop/ignored to the HDF5 library's H5_GCC_DIAG_OFF()/H5_GCC_DIAG_ON() macros.
Diffstat (limited to 'test/error_test.c')
-rw-r--r--test/error_test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/error_test.c b/test/error_test.c
index e99a82f..7c6cf9f 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -329,8 +329,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
* 'full_desc' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_long_desc(void)
{
@@ -385,7 +384,7 @@ error:
return -1;
} /* end test_long_desc() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------