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 /tools/lib | |
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 'tools/lib')
-rw-r--r-- | tools/lib/h5diff_array.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 1 | ||||
-rw-r--r-- | tools/lib/h5tools_ref.c | 4 | ||||
-rw-r--r-- | tools/lib/io_timer.c | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 825ca06..c554160 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -3345,7 +3345,7 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) int j; hsize_t count; hsize_t block; - hsize_t stride; + hsize_t stride = 0; hsize_t tmp = 0; hsize_t k0 = 0; /* whole location beyond current dimension */ hsize_t k1 = 0; /* partial location within dimension */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 396de54..e752895 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -51,7 +51,6 @@ int region_output; /* region output */ int oid_output; /* oid output */ int data_output; /* data output */ int attr_data_output; /* attribute data output */ -int compound_data; unsigned packed_bits_num; /* number of packed bits to display */ unsigned packed_data_offset; /* offset of packed bits to display */ diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 9f12367..33f9dd6 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -254,7 +254,7 @@ ref_path_table_put(const char *path, const H5O_token_t *token) /* * counter used to disambiguate multiple instances of same object. */ -int xid = 1; +static int xid = 1; int get_next_xid(void) @@ -268,7 +268,7 @@ get_next_xid(void) * minimizes the chance of collision with a real object id. * */ -haddr_t fake_xid = HADDR_MAX; +static haddr_t fake_xid = HADDR_MAX; void get_fake_token(H5O_token_t *token) diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index 49a4a20..6a8d091 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -33,7 +33,7 @@ #define MICROSECOND 1000000.0F /* global variables */ -io_time_t *timer_g; /* timer: global for stub functions */ +static io_time_t *timer_g; /* timer: global for stub functions */ /* * Function: sub_time |