diff options
author | Quincey Koziol <koziol@lbl.gov> | 2019-07-10 03:21:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2019-07-10 03:21:33 (GMT) |
commit | 22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0 (patch) | |
tree | 43f503fea615b405e03863e1befc1c91bd9f65ef /test/h5test.c | |
parent | c33f2cbf18b4cc0aafedfe2d1cc29ed7730c91f6 (diff) | |
parent | 73df02f13c2b1e0b256cdbff1c7c584e84548df4 (diff) | |
download | hdf5-22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0.zip hdf5-22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0.tar.gz hdf5-22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0.tar.bz2 |
Merge pull request #1788 in HDFFV/hdf5 from ~KOZIOL/hdf5:feature/update_gcc_flags to develop
* commit '73df02f13c2b1e0b256cdbff1c7c584e84548df4':
Updates to warnhist script, along with a few cleanups, and add some comments to warning cleanups that are a bit obscure.
Cleaned up code that genericizes warning output, and add "-u" option to leave unique types in warnings (i.e. don't genericize output). Also fixed the '-S' option to work correctly.
Added GCC9 flags to CMake build
Add support for GCC9, update warnhist script, and clean up warnings.
Diffstat (limited to 'test/h5test.c')
-rw-r--r-- | test/h5test.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/h5test.c b/test/h5test.c index 59ccfe4..d83c6e7 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -190,6 +190,14 @@ h5_clean_files(const char *base_name[], hid_t fapl) * *------------------------------------------------------------------------- */ +/* Disable warning for "format not a string literal" here -QAK */ +/* + * This pragma only needs to surround the snprintf() calls with + * 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" void h5_delete_test_file(const char *base_name, hid_t fapl) { @@ -239,6 +247,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl) return; } /* end h5_delete_test_file() */ +#pragma GCC diagnostic pop /*------------------------------------------------------------------------- @@ -1344,6 +1353,14 @@ h5_dump_info_object(MPI_Info info) * *------------------------------------------------------------------------- */ +/* Disable warning for "format not a string literal" here -QAK */ +/* + * This pragma only needs to surround the snprintf() calls with + * 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_stat_size_t h5_get_file_size(const char *filename, hid_t fapl) { @@ -1445,12 +1462,14 @@ h5_get_file_size(const char *filename, hid_t fapl) return(-1); } /* end get_file_size() */ +#pragma GCC diagnostic pop /* * This routine is designed to provide equivalent functionality to 'printf' * and allow easy replacement for environments which don't have stdin/stdout * available. (i.e. Windows & the Mac) */ +H5_ATTR_FORMAT(printf, 1, 2) int print_func(const char *format, ...) { @@ -2016,7 +2035,7 @@ error: * *------------------------------------------------------------------------- */ -char * +H5_ATTR_PURE const char * h5_get_version_string(H5F_libver_t libver) { return(LIBVER_NAMES[libver]); |