diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2023-09-08 23:06:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 23:06:23 (GMT) |
commit | 117d579c326f64d09d71e28cb0135bbd16a5232e (patch) | |
tree | 384ac7e1e3b9881e6d6ab783ee0391ab7adc1f29 /test/reserved.c | |
parent | 2345f901b26277f643dd91a528e4da975f4e75c1 (diff) | |
download | hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.zip hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.gz hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.bz2 |
Consistent initialization of hid_t in the tests (#3521)
Diffstat (limited to 'test/reserved.c')
-rw-r--r-- | test/reserved.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/reserved.c b/test/reserved.c index 1b29f8b..f9d1c7f 100644 --- a/test/reserved.c +++ b/test/reserved.c @@ -31,8 +31,8 @@ static const char *FILENAME[] = {"rsrv_heap", "rsrv_ohdr", "rsrv_vlen", NULL}; static herr_t rsrv_heap(void) { - hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1); - hid_t fapl = (-1), fcpl = (-1); + hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID); + hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID); hsize_t dims[1] = {1}; char filename[1024], dset_name[10]; int i; @@ -160,8 +160,8 @@ error: static herr_t rsrv_ohdr(void) { - hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1); - hid_t fapl = (-1), fcpl = (-1), aid, attr_id; + hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID); + hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID), aid, attr_id; hsize_t dims[2]; herr_t status; int attrval[4][6]; @@ -298,8 +298,9 @@ error: static herr_t rsrv_vlen(void) { - hid_t file_id = (-1), dataset_id = (-1), dataspace_id = (-1), type_id = (-1); - hid_t fapl = (-1), fcpl = (-1), mem_space_id = (-1); + hid_t file_id = (H5I_INVALID_HID), dataset_id = (H5I_INVALID_HID), dataspace_id = (H5I_INVALID_HID), + type_id = (H5I_INVALID_HID); + hid_t fapl = (H5I_INVALID_HID), fcpl = (H5I_INVALID_HID), mem_space_id = (H5I_INVALID_HID); hssize_t offset[1]; hsize_t start[1]; hsize_t dims[1], count[1]; |