summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-06-19 05:13:38 (GMT)
committerGitHub <noreply@github.com>2023-06-19 05:13:38 (GMT)
commit65d8c9347010771473b53c91adcec2f281772213 (patch)
tree487567dae0dc005de896f616b90e67744239a5e2 /test/th5s.c
parent1f20354ee6cdfa9fd157ac9cdfff9acdf320a32d (diff)
downloadhdf5-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/th5s.c')
-rw-r--r--test/th5s.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 31944e6..7e9d216 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -74,18 +74,18 @@
/* Scalar dataset with simple datatype */
#define SPACE3_RANK 0
-unsigned space3_data = 65;
+static unsigned space3_data = 65;
/* Scalar dataset with compound datatype */
#define SPACE4_FIELDNAME1 "c1"
#define SPACE4_FIELDNAME2 "u"
#define SPACE4_FIELDNAME3 "f"
#define SPACE4_FIELDNAME4 "c2"
-size_t space4_field1_off = 0;
-size_t space4_field2_off = 0;
-size_t space4_field3_off = 0;
-size_t space4_field4_off = 0;
-struct space4_struct {
+static size_t space4_field1_off = 0;
+static size_t space4_field2_off = 0;
+static size_t space4_field3_off = 0;
+static size_t space4_field4_off = 0;
+static struct space4_struct {
char c1;
unsigned u;
float f;