summaryrefslogtreecommitdiffstats
path: root/test/error_test.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/error_test.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/error_test.c')
-rw-r--r--test/error_test.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/error_test.c b/test/error_test.c
index 1bcbcd4..97802a3 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -28,31 +28,31 @@ main(void)
}
#else /* H5_USE_16_API */
-const char *FILENAME[] = {"errors", NULL};
+static const char *FILENAME[] = {"errors", NULL};
#define DATAFILE "filter_error"
#define DIM0 100
#define DIM1 200
-int **ipoints2 = NULL;
-int **icheck2 = NULL;
-int *ipoints2_data = NULL;
-int *icheck2_data = NULL;
+static int **ipoints2 = NULL;
+static int **icheck2 = NULL;
+static int *ipoints2_data = NULL;
+static int *icheck2_data = NULL;
-hid_t ERR_CLS;
-hid_t ERR_CLS2;
-hid_t ERR_STACK;
+static hid_t ERR_CLS;
+static hid_t ERR_CLS2;
+static hid_t ERR_STACK;
-hid_t ERR_MAJ_TEST;
-hid_t ERR_MAJ_IO;
-hid_t ERR_MAJ_API;
+static hid_t ERR_MAJ_TEST;
+static hid_t ERR_MAJ_IO;
+static hid_t ERR_MAJ_API;
-hid_t ERR_MIN_SUBROUTINE;
-hid_t ERR_MIN_ERRSTACK;
-hid_t ERR_MIN_CREATE;
-hid_t ERR_MIN_WRITE;
-hid_t ERR_MIN_GETNUM;
+static hid_t ERR_MIN_SUBROUTINE;
+static hid_t ERR_MIN_ERRSTACK;
+static hid_t ERR_MIN_CREATE;
+static hid_t ERR_MIN_WRITE;
+static hid_t ERR_MIN_GETNUM;
#define DSET_NAME "a_dataset"
#define FAKE_ID (hid_t)0