diff options
author | David Young <dyoung@hdfgroup.org> | 2020-01-29 02:35:28 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-01-29 02:35:28 (GMT) |
commit | fa1b2f6ef35c459c9f74ead885c119ae7f61c056 (patch) | |
tree | a71219e0f97dfd57e2c1a8a2e89b65476631ba0b /test/vfd.c | |
parent | 71c050f837149a0c11e0936e661047c091deaa2f (diff) | |
download | hdf5-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/vfd.c')
-rw-r--r-- | test/vfd.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -776,8 +776,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. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +H5_GCC_DIAG_OFF(format-nonliteral) static herr_t test_family_opens(char *fname, hid_t fa_pl) { @@ -834,7 +833,7 @@ test_family_opens(char *fname, hid_t fa_pl) error: return -1; } /* end test_family_opens() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- @@ -1058,8 +1057,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. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +H5_GCC_DIAG_OFF(format-nonliteral) static herr_t test_family_compat(void) { @@ -1143,7 +1141,7 @@ error: return -1; } /* end test_family_compat() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- @@ -1282,8 +1280,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. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +H5_GCC_DIAG_OFF(format-nonliteral) static herr_t test_multi_opens(char *fname) { @@ -1301,7 +1298,7 @@ test_multi_opens(char *fname) return(fid >= 0 ? FAIL : SUCCEED); } /* end test_multi_opens() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- |