diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/big.c | 5 | ||||
-rw-r--r-- | test/error_test.c | 5 | ||||
-rw-r--r-- | test/fheap.c | 5 | ||||
-rw-r--r-- | test/file_image.c | 5 | ||||
-rw-r--r-- | test/h5test.c | 10 | ||||
-rw-r--r-- | test/vfd.c | 15 |
6 files changed, 18 insertions, 27 deletions
@@ -281,8 +281,7 @@ error: * '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 enough_room(hid_t fapl) { @@ -323,7 +322,7 @@ done: return ret_value; } -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- 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) /*------------------------------------------------------------------------- diff --git a/test/fheap.c b/test/fheap.c index b8c54d6..7772ff7 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -545,8 +545,7 @@ get_fill_size(const fheap_test_param_t *tparam) * test_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 int begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *keep_ids, size_t *fill_size) @@ -575,7 +574,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, /* Success */ return(0); } /* end begin_test() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- 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) /****************************************************************************** diff --git a/test/h5test.c b/test/h5test.c index ab859a5..bfc24dd 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -196,8 +196,7 @@ h5_clean_files(const char *base_name[], hid_t fapl) * sub_filename 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) void h5_delete_test_file(const char *base_name, hid_t fapl) { @@ -247,7 +246,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl) return; } /* end h5_delete_test_file() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- @@ -1358,8 +1357,7 @@ h5_dump_info_object(MPI_Info info) * temp 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) h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl) { @@ -1461,7 +1459,7 @@ h5_get_file_size(const char *filename, hid_t fapl) return(-1); } /* end get_file_size() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /* * This routine is designed to provide equivalent functionality to 'printf' @@ -779,8 +779,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) { @@ -837,7 +836,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) /*------------------------------------------------------------------------- @@ -1061,8 +1060,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) { @@ -1146,7 +1144,7 @@ error: return -1; } /* end test_family_compat() */ -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON(format-nonliteral) /*------------------------------------------------------------------------- @@ -1285,8 +1283,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) { @@ -1304,7 +1301,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) /*------------------------------------------------------------------------- |