diff options
Diffstat (limited to 'test/file_image.c')
-rw-r--r-- | test/file_image.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/file_image.c b/test/file_image.c index 12f0a18..111a591 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -579,7 +579,8 @@ test_core(void) reset_udata(udata); file = H5Fopen(copied_filename, H5F_ACC_RDONLY, fapl); VERIFY(file >= 0, "H5Fopen failed"); - VERIFY(udata->used_callbacks == MALLOC, "opening a core file used the wrong callbacks"); + VERIFY((udata->used_callbacks == MALLOC) || + (udata->used_callbacks == (MALLOC | UDATA_COPY | UDATA_FREE)), "opening a core file used the wrong callbacks"); VERIFY(udata->malloc_src == H5FD_FILE_IMAGE_OP_FILE_OPEN, "Malloc callback came from wrong sourc in core open"); /* Close file */ @@ -671,6 +672,14 @@ error: * ****************************************************************************** */ +/* Disable warning for "format not a string literal" here -QAK */ +/* + * This pragma only needs to surround the snprintf() calls with + * '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" static int test_get_file_image(const char * test_banner, const int file_name_num, @@ -702,7 +711,7 @@ test_get_file_image(const char * test_banner, hid_t fcpl = -1; herr_t ret; - TESTING(test_banner); + TESTING("%s", test_banner); /* set flag if we are dealing with a family file */ driver = H5Pget_driver(fapl); @@ -937,6 +946,7 @@ test_get_file_image(const char * test_banner, error: return 1; } /* end test_get_file_image() */ +#pragma GCC diagnostic pop /****************************************************************************** |