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/enc_dec_plist.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/enc_dec_plist.c')
-rw-r--r-- | test/enc_dec_plist.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c index 46956fc..14cb78e 100644 --- a/test/enc_dec_plist.c +++ b/test/enc_dec_plist.c @@ -24,10 +24,10 @@ static int test_encode_decode(hid_t orig_pl, H5F_libver_t low, H5F_libver_t high) { - hid_t pl = (-1); /* Decoded property list */ - hid_t fapl = -1; /* File access property list */ - void *temp_buf = NULL; /* Pointer to encoding buffer */ - size_t temp_size = 0; /* Size of encoding buffer */ + hid_t pl = (H5I_INVALID_HID); /* Decoded property list */ + hid_t fapl = H5I_INVALID_HID; /* File access property list */ + void *temp_buf = NULL; /* Pointer to encoding buffer */ + size_t temp_size = 0; /* Size of encoding buffer */ /* Create file access property list */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -113,24 +113,24 @@ error: int main(void) { - hid_t dcpl; /* dataset create prop. list */ - hid_t dapl; /* dataset access prop. list */ - hid_t dxpl; /* dataset xfer prop. list */ - hid_t gcpl; /* group create prop. list */ - hid_t ocpypl; /* object copy prop. list */ - hid_t ocpl; /* object create prop. list */ - hid_t lcpl; /* link create prop. list */ - hid_t lapl; /* link access prop. list */ - hid_t fapl; /* file access prop. list */ - hid_t fcpl; /* file create prop. list */ - hid_t strcpl; /* string create prop. list */ - hid_t acpl; /* attribute create prop. list */ - hid_t srcspace = -1; /* Source dataspaces */ - hid_t vspace = -1; /* Virtual dset dataspaces */ - hsize_t dims[1] = {3}; /* Data space current size */ - hsize_t chunk_size[2] = {16384, 4}; /* chunk size */ - double fill = 2.7; /* Fill value */ - hsize_t max_size[1]; /* data space maximum size */ + hid_t dcpl; /* dataset create prop. list */ + hid_t dapl; /* dataset access prop. list */ + hid_t dxpl; /* dataset xfer prop. list */ + hid_t gcpl; /* group create prop. list */ + hid_t ocpypl; /* object copy prop. list */ + hid_t ocpl; /* object create prop. list */ + hid_t lcpl; /* link create prop. list */ + hid_t lapl; /* link access prop. list */ + hid_t fapl; /* file access prop. list */ + hid_t fcpl; /* file create prop. list */ + hid_t strcpl; /* string create prop. list */ + hid_t acpl; /* attribute create prop. list */ + hid_t srcspace = H5I_INVALID_HID; /* Source dataspaces */ + hid_t vspace = H5I_INVALID_HID; /* Virtual dset dataspaces */ + hsize_t dims[1] = {3}; /* Data space current size */ + hsize_t chunk_size[2] = {16384, 4}; /* chunk size */ + double fill = 2.7; /* Fill value */ + hsize_t max_size[1]; /* data space maximum size */ size_t nslots = 521 * 2; size_t nbytes = 1048576 * 10; double w0 = 0.5; |