diff options
author | Sean McBride <sean@rogue-research.com> | 2023-06-19 05:13:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 05:13:38 (GMT) |
commit | 65d8c9347010771473b53c91adcec2f281772213 (patch) | |
tree | 487567dae0dc005de896f616b90e67744239a5e2 /test/tfile.c | |
parent | 1f20354ee6cdfa9fd157ac9cdfff9acdf320a32d (diff) | |
download | hdf5-65d8c9347010771473b53c91adcec2f281772213.zip hdf5-65d8c9347010771473b53c91adcec2f281772213.tar.gz hdf5-65d8c9347010771473b53c91adcec2f281772213.tar.bz2 |
Many fixes to various compiler warnings (#3124)
* Fixed various -Wmissing-variable-declarations by adding static keyword
* In a few cases, renamed the variable suffix from _g to _s.
* Fixed some -Wmissing-variable-declarations by using different declaration macros
* Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero
* Fixed various -Wcomma warnings
* Fixed clang -Wstrict-prototypes warnings
* Fixed various -Wunused-variable warnings
* Updated some casts to fix the only 3 -Wcast-qual warnings
* Fixed the only -Wsometimes-uninitialized warning
Diffstat (limited to 'test/tfile.c')
-rw-r--r-- | test/tfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tfile.c b/test/tfile.c index ac931cc..4bb2d82 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -142,14 +142,14 @@ #define FILE8 "tfile8.h5" /* Test file */ /* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */ -const char *OLD_FILENAME[] = { +static const char *OLD_FILENAME[] = { "filespace_1_6.h5", /* 1.6 HDF5 file */ "filespace_1_8.h5" /* 1.8 HDF5 file */ }; /* Files created in 1.10.0 release --used in test_filespace_1.10.0_compatible() */ /* These files are copied from release 1.10.0 tools/h5format_convert/testfiles */ -const char *OLD_1_10_0_FILENAME[] = { +static const char *OLD_1_10_0_FILENAME[] = { "h5fc_ext1_i.h5", /* 0 */ "h5fc_ext1_f.h5", /* 1 */ "h5fc_ext2_if.h5", /* 2 */ @@ -159,7 +159,7 @@ const char *OLD_1_10_0_FILENAME[] = { }; /* Files used in test_filespace_round_compatible() */ -const char *FSPACE_FILENAMES[] = { +static const char *FSPACE_FILENAMES[] = { "fsm_aggr_nopersist.h5", /* H5F_FILE_SPACE_AGGR, not persisting free-space */ "fsm_aggr_persist.h5", /* H5F_FILE_SPACE_AGGR, persisting free-space */ "paged_nopersist.h5", /* H5F_FILE_SPACE_PAGE, not persisting free-space */ @@ -168,7 +168,7 @@ const char *FSPACE_FILENAMES[] = { "none.h5" /* H5F_FILE_SPACE_NONE */ }; -const char *FILESPACE_NAME[] = {"tfilespace", NULL}; +static const char *FILESPACE_NAME[] = {"tfilespace", NULL}; /* Declarations for test_libver_bounds_copy(): */ /* SRC_FILE: source file created under 1.8 branch with latest format */ |