summaryrefslogtreecommitdiffstats
path: root/test/trefer.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-09-08 23:06:23 (GMT)
committerGitHub <noreply@github.com>2023-09-08 23:06:23 (GMT)
commit117d579c326f64d09d71e28cb0135bbd16a5232e (patch)
tree384ac7e1e3b9881e6d6ab783ee0391ab7adc1f29 /test/trefer.c
parent2345f901b26277f643dd91a528e4da975f4e75c1 (diff)
downloadhdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.zip
hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.gz
hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.bz2
Consistent initialization of hid_t in the tests (#3521)
Diffstat (limited to 'test/trefer.c')
-rw-r--r--test/trefer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/trefer.c b/test/trefer.c
index d4c9175..a8bef09 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -2155,17 +2155,17 @@ test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2
static void
test_reference_group(void)
{
- hid_t fid = -1; /* File ID */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
- hid_t did; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- H5R_ref_t wref; /* Reference to write */
- H5R_ref_t rref; /* Reference to read */
- H5G_info_t ginfo; /* Group info struct */
- char objname[NAME_SIZE]; /* Buffer to store name */
- H5O_info2_t oinfo; /* Object info struct */
- int count = 0; /* Count within iterated group */
- ssize_t size; /* Name length */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */
+ hid_t did; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ H5R_ref_t wref; /* Reference to write */
+ H5R_ref_t rref; /* Reference to read */
+ H5G_info_t ginfo; /* Group info struct */
+ char objname[NAME_SIZE]; /* Buffer to store name */
+ H5O_info2_t oinfo; /* Object info struct */
+ int count = 0; /* Count within iterated group */
+ ssize_t size; /* Name length */
herr_t ret;
/* Create file with a group and a dataset containing an object reference to the group */