summaryrefslogtreecommitdiffstats
path: root/tools/h5stat/h5stat_gentest.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-02-11 20:51:38 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-02-11 20:51:38 (GMT)
commit702f719e0c6771c8eb56d63566d20b3cef961f2c (patch)
tree5e879b35c08dcb0f6b50cb1c457cb6fac0083d26 /tools/h5stat/h5stat_gentest.c
parent84c4ade7146b9a0f43ba22e4263bef7e56700c4d (diff)
downloadhdf5-702f719e0c6771c8eb56d63566d20b3cef961f2c.zip
hdf5-702f719e0c6771c8eb56d63566d20b3cef961f2c.tar.gz
hdf5-702f719e0c6771c8eb56d63566d20b3cef961f2c.tar.bz2
HDFFV-11012, sanitize, warnings and tools ids
Diffstat (limited to 'tools/h5stat/h5stat_gentest.c')
-rw-r--r--tools/h5stat/h5stat_gentest.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c
index b583faa..6b4e97b 100644
--- a/tools/h5stat/h5stat_gentest.c
+++ b/tools/h5stat/h5stat_gentest.c
@@ -46,13 +46,13 @@
static void
gen_newgrat_file(const char *fname)
{
- hid_t fapl = -1; /* File access property */
- hid_t fid = -1; /* File id */
- hid_t gid = -1; /* Group id */
- hid_t tid = -1; /* Datatype id */
- hid_t sid = -1; /* Dataspace id */
- hid_t attr_id = -1; /* Attribute id */
- hid_t did = -1; /* Dataset id */
+ hid_t fapl = H5I_INVALID_HID; /* File access property */
+ hid_t fid = H5I_INVALID_HID; /* File id */
+ hid_t gid = H5I_INVALID_HID; /* Group id */
+ hid_t tid = H5I_INVALID_HID; /* Datatype id */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace id */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute id */
+ hid_t did = H5I_INVALID_HID; /* Dataset id */
char name[30]; /* Group name */
char attrname[30]; /* Attribute name */
int i; /* Local index variable */
@@ -121,15 +121,15 @@ error:
static void
gen_threshold_file(const char *fname)
{
- hid_t fid = -1; /* File ID */
- hid_t sid0 = -1; /* Dataspace IDs */
- hid_t sid1 = -1; /* Dataspace IDs */
- hid_t sid2 = -1; /* Dataspace IDs */
- hid_t sid3 = -1; /* Dataspace IDs */
- hid_t sid4 = -1; /* Dataspace IDs */
- hid_t did = -1; /* Dataset ID */
- hid_t attr_id = -1; /* Attribute ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t sid0 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid1 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid2 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid3 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t sid4 = H5I_INVALID_HID; /* Dataspace IDs */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ hid_t attr_id = H5I_INVALID_HID; /* Attribute ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
hsize_t two_dims[] = {2, 5}; /* Dimension array */
hsize_t one_dims[] = {6}; /* Dimension array */
hsize_t zero_dims[] = {0}; /* Dimension array */