summaryrefslogtreecommitdiffstats
path: root/test/file_image.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-01-29 02:35:28 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-01-29 02:35:28 (GMT)
commitfa1b2f6ef35c459c9f74ead885c119ae7f61c056 (patch)
treea71219e0f97dfd57e2c1a8a2e89b65476631ba0b /test/file_image.c
parent71c050f837149a0c11e0936e661047c091deaa2f (diff)
downloadhdf5-fa1b2f6ef35c459c9f74ead885c119ae7f61c056.zip
hdf5-fa1b2f6ef35c459c9f74ead885c119ae7f61c056.tar.gz
hdf5-fa1b2f6ef35c459c9f74ead885c119ae7f61c056.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/file_image.c')
-rw-r--r--test/file_image.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/file_image.c b/test/file_image.c
index ddbec80..dfb3ae8 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -678,8 +678,7 @@ error:
* 'member_file_name' 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 int
test_get_file_image(const char * test_banner,
const int file_name_num,
@@ -946,7 +945,7 @@ test_get_file_image(const char * test_banner,
error:
return 1;
} /* end test_get_file_image() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/******************************************************************************