diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/accum.c | 16 | ||||
-rw-r--r-- | test/cache.c | 8 | ||||
-rw-r--r-- | test/dtypes.c | 2 | ||||
-rw-r--r-- | test/filter_plugin2_dsets.c | 2 | ||||
-rw-r--r-- | test/filter_plugin4_groups.c | 2 | ||||
-rw-r--r-- | test/swmr.c | 34 | ||||
-rw-r--r-- | test/tarray.c | 43 | ||||
-rw-r--r-- | test/tfile.c | 48 | ||||
-rw-r--r-- | test/th5s.c | 12 | ||||
-rw-r--r-- | test/tid.c | 2 | ||||
-rw-r--r-- | test/titerate.c | 2 | ||||
-rw-r--r-- | test/tvltypes.c | 8 |
12 files changed, 98 insertions, 81 deletions
diff --git a/test/accum.c b/test/accum.c index 3658879..330c656 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2066,13 +2066,14 @@ error: /*------------------------------------------------------------------------- * Function: test_swmr_write_big * - * Purpose: A SWMR test: verifies that writing "large" metadata to a file - * opened with SWMR_WRITE will flush the existing metadata in the - * accumulator to disk first before writing the "large" metadata - * to disk. - * This test will fork and exec a reader "accum_swmr_reader" which - * opens the same file with SWMR_READ and verifies that the correct - * metadata is read from disk. + * Purpose: A SWMR test: verifies that writing "large" metadata to a file + * opened with SWMR_WRITE will flush the existing metadata in the + * accumulator to disk first before writing the "large" metadata + * to disk. + * + * This test will fork and exec a reader "accum_swmr_reader" which + * opens the same file with SWMR_READ and verifies that the correct + * metadata is read from disk. * * Return: Success: 0 * Failure: 1 @@ -2292,6 +2293,7 @@ test_swmr_write_big(hbool_t newest_format) FAIL_STACK_ERROR; /* Pop API context */ + if (api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR api_ctx_pushed = FALSE; diff --git a/test/cache.c b/test/cache.c index 92cc50d..cd7826e 100644 --- a/test/cache.c +++ b/test/cache.c @@ -27275,7 +27275,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) /* Fill out the rest of the cache with entries */ /* Verify expected status of entries after each insertion */ - for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) { + for (; entry_idx < 50; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ @@ -27409,7 +27409,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) * After each insertion, verify the expected status of the * entries in the cache. */ - for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) { + for (; entry_idx < 100; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ @@ -33221,7 +33221,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) /* Fill out the rest of the cache with entries */ /* Verify expected status of entries after each insertion */ - for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) { + for (; entry_idx < 50; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ @@ -33282,7 +33282,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) if (pass) { /* Insert 50 more entries (indices 50-99) into the cache. */ - for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) { + for (; entry_idx < 100; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ diff --git a/test/dtypes.c b/test/dtypes.c index e342f03..383361b 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -1482,7 +1482,7 @@ test_compound_8(void) int b; } s1; - typedef struct s2 { + struct s2 { char c; s1 d; } s2; diff --git a/test/filter_plugin2_dsets.c b/test/filter_plugin2_dsets.c index 8f57121..d2011d4 100644 --- a/test/filter_plugin2_dsets.c +++ b/test/filter_plugin2_dsets.c @@ -73,7 +73,7 @@ mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu return 0; /* Assignment to eliminate unused parameter warning */ - cd_values = cd_values; + (void)cd_values; if (flags & H5Z_FLAG_REVERSE) { /* READ - Divide the original value by MULTIPLIER */ diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c index eeec269..630dcd6 100644 --- a/test/filter_plugin4_groups.c +++ b/test/filter_plugin4_groups.c @@ -74,7 +74,7 @@ append_to_group_name(unsigned int flags, size_t cd_nelmts, const unsigned int *c return 0; /* Assignment to eliminate unused parameter warning. */ - cd_values = cd_values; + (void)cd_values; if (flags & H5Z_FLAG_REVERSE) { /* READ - Remove the suffix from the group name */ diff --git a/test/swmr.c b/test/swmr.c index 0764ae4..9a6fee4 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -846,14 +846,17 @@ error: static int test_metadata_read_retry_info(hid_t in_fapl) { - hid_t fapl, new_fapl; /* File access property list */ - hid_t fid, fid1; /* File IDs */ + hid_t fapl = H5I_INVALID_HID; /* File access property list */ + hid_t new_fapl = H5I_INVALID_HID; /* File access property list */ + hid_t fid = H5I_INVALID_HID; /* File ID */ + hid_t fid1 = H5I_INVALID_HID; /* File ID */ H5F_retry_info_t info, info1; /* The collection of metadata retries */ H5F_t * f = NULL, *f1 = NULL; /* Internal file object pointers */ unsigned i, j, n; /* Local index variables */ - hid_t did1, did2; /* Dataset IDs */ - hid_t sid; /* Dataspace ID */ - hid_t dcpl; /* Dataset creation property list */ + hid_t did1 = H5I_INVALID_HID; /* Dataset ID */ + hid_t did2 = H5I_INVALID_HID; /* Dataset ID */ + hid_t sid = H5I_INVALID_HID; /* Dataspace ID */ + hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hsize_t dims[2] = {6, 10}; /* Dataset dimensions */ char filename[NAME_BUF_SIZE]; /* File name */ int buf[6][10], chkbuf1[6][10], chkbuf2[6][10]; /* Buffers for data */ @@ -1622,7 +1625,7 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format) FAIL_STACK_ERROR /* Should be 100 */ - if (attempts != (new_format ? H5F_METADATA_READ_ATTEMPTS : H5F_SWMR_METADATA_READ_ATTEMPTS)) + if (attempts != (unsigned int)(new_format ? H5F_METADATA_READ_ATTEMPTS : H5F_SWMR_METADATA_READ_ATTEMPTS)) TEST_ERROR; /* Close the property list */ @@ -4498,8 +4501,9 @@ error: static int test_file_lock_swmr_same(hid_t in_fapl) { - hid_t fid, fid2; /* File IDs */ - hid_t fapl; /* File access property list */ + hid_t fid = H5I_INVALID_HID; /* File IDs */ + hid_t fid2 = H5I_INVALID_HID; + hid_t fapl = H5I_INVALID_HID; /* File access property list */ char filename[NAME_BUF_SIZE]; /* file name */ /* Output message about test being performed */ @@ -6557,10 +6561,18 @@ error: static int test_bug_refresh(hid_t in_fapl) { - hid_t fid = -1; /* File ID */ - hid_t fapl; + hid_t fid = H5I_INVALID_HID; + hid_t fapl = H5I_INVALID_HID; H5F_t *f; - hid_t gid1, gid2, gid3, gid4, gid5, gid6, gid7, gid8, gid9; + hid_t gid1 = H5I_INVALID_HID; + hid_t gid2 = H5I_INVALID_HID; + hid_t gid3 = H5I_INVALID_HID; + hid_t gid4 = H5I_INVALID_HID; + hid_t gid5 = H5I_INVALID_HID; + hid_t gid6 = H5I_INVALID_HID; + hid_t gid7 = H5I_INVALID_HID; + hid_t gid8 = H5I_INVALID_HID; + hid_t gid9 = H5I_INVALID_HID; char filename[NAME_BUF_SIZE]; /* File name */ /* Create a copy of the input parameter in_fapl */ diff --git a/test/tarray.c b/test/tarray.c index 4fa4d1d..59a38a8 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -157,8 +157,8 @@ test_array_atomic_1d(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -490,8 +490,8 @@ test_array_array_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims1; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -668,8 +668,8 @@ test_array_compound_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -889,8 +889,8 @@ test_array_compound_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -951,8 +951,9 @@ test_array_compound_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Nested array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf( + "Nested array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1209,8 +1210,8 @@ test_array_vlen_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1439,8 +1440,8 @@ test_array_vlen_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1471,8 +1472,8 @@ test_array_vlen_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -2080,8 +2081,9 @@ test_compat(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf( + "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -2127,8 +2129,9 @@ test_compat(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf( + "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ diff --git a/test/tfile.c b/test/tfile.c index 250fced..2b7ada1 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -5486,7 +5486,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n /* Get the internal file pointer if the create succeeds */ if (fid >= 0) { f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); } /* Retrieve the low/high bounds */ @@ -5660,7 +5660,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non /* Get the internal file pointer */ f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); /* The file's superblock version */ super_vers = f->shared->sblock->super_vers; @@ -5701,7 +5701,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non /* Get the internal file pointer if the open succeeds */ if (fid >= 0) { f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); } /* Verify the file open succeeds or fails */ @@ -5878,7 +5878,7 @@ test_libver_bounds_obj(hid_t fapl) /* Get the internal file pointer */ f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); /* Create a group in the file */ gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -5986,7 +5986,7 @@ test_libver_bounds_dataset(hid_t fapl) /* Get the internal dataset pointer */ dset = (H5D_t *)H5I_object(did); - CHECK(dset, NULL, "H5I_object"); + CHECK_PTR(dset, "H5I_object"); /* Verify version for layout and fill value messages */ if (low == H5F_LIBVER_EARLIEST) { @@ -6034,7 +6034,7 @@ test_libver_bounds_dataset(hid_t fapl) /* Get the internal dataset pointer */ dset = (H5D_t *)H5I_object(did); - CHECK(dset, NULL, "H5I_object"); + CHECK_PTR(dset, "H5I_object"); /* Verify layout message version and chunk indexing type */ VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_4, "H5O_layout_ver_bounds"); @@ -6096,7 +6096,7 @@ test_libver_bounds_dataset(hid_t fapl) /* Get the internal file pointer */ f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); /* Create the chunked dataset */ did = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); @@ -6104,7 +6104,7 @@ test_libver_bounds_dataset(hid_t fapl) /* Get the internal file pointer */ dset = (H5D_t *)H5I_object(did); - CHECK(dset, NULL, "H5I_object"); + CHECK_PTR(dset, "H5I_object"); /* Verify the dataset's layout, fill value and filter pipeline message versions */ /* Also verify the chunk indexing type */ @@ -6225,7 +6225,7 @@ test_libver_bounds_dataspace(hid_t fapl) sid = H5Dget_space(did); CHECK(sid, H5I_INVALID_HID, "H5Dget_space"); space = (H5S_t *)H5I_object(sid); - CHECK(space, NULL, "H5I_object"); + CHECK_PTR(space, "H5I_object"); /* Verify the dataspace version */ VERIFY(space->extent.version, H5O_sdspace_ver_bounds[low], "H5O_sdspace_ver_bounds"); @@ -6242,7 +6242,7 @@ test_libver_bounds_dataspace(hid_t fapl) sid_null = H5Dget_space(did_null); CHECK(sid_null, H5I_INVALID_HID, "H5Dget_space"); space_null = (H5S_t *)H5I_object(sid_null); - CHECK(space_null, NULL, "H5I_object"); + CHECK_PTR(space_null, "H5I_object"); /* Verify the dataspace version */ VERIFY(space_null->extent.version, H5O_SDSPACE_VERSION_2, "H5O_sdspace_ver_bounds"); @@ -6320,7 +6320,7 @@ test_libver_bounds_dataspace(hid_t fapl) /* Get the internal file pointer */ f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); /* Create the chunked dataset */ did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); @@ -6330,7 +6330,7 @@ test_libver_bounds_dataspace(hid_t fapl) tmp_sid = H5Dget_space(did); CHECK(tmp_sid, H5I_INVALID_HID, "H5Dget_space"); tmp_space = (H5S_t *)H5I_object(tmp_sid); - CHECK(tmp_space, NULL, "H5I_object"); + CHECK_PTR(tmp_space, "H5I_object"); /* Create the compact dataset */ did_compact = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid_compact, H5P_DEFAULT, dcpl_compact, @@ -6341,7 +6341,7 @@ test_libver_bounds_dataspace(hid_t fapl) tmp_sid_compact = H5Dget_space(did_compact); CHECK(tmp_sid_compact, H5I_INVALID_HID, "H5Dget_space"); tmp_space_compact = (H5S_t *)H5I_object(tmp_sid_compact); - CHECK(tmp_space_compact, NULL, "H5I_object"); + CHECK_PTR(tmp_space_compact, "H5I_object"); /* Create the contiguous dataset */ did_contig = @@ -6352,7 +6352,7 @@ test_libver_bounds_dataspace(hid_t fapl) tmp_sid_contig = H5Dget_space(did_contig); CHECK(tmp_sid_contig, H5I_INVALID_HID, "H5Dget_space"); tmp_space_contig = (H5S_t *)H5I_object(tmp_sid_contig); - CHECK(tmp_space_contig, NULL, "H5I_object"); + CHECK_PTR(tmp_space_contig, "H5I_object"); /* Verify versions for the three dataspaces */ VERIFY(tmp_space->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], @@ -6576,7 +6576,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid) /* Get the internal datatype pointer */ dtype = (H5T_t *)H5I_object(dtid); - CHECK(dtype, NULL, "H5I_object"); + CHECK_PTR(dtype, "H5I_object"); /* Verify the datatype message version */ /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY: @@ -6650,13 +6650,13 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid) /* Get the internal file pointer */ f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); /* Open the committed datatype */ str_tid = H5Topen2(fid, "datatype", H5P_DEFAULT); CHECK(str_tid, FAIL, "H5Topen2"); str_dtype = (H5T_t *)H5I_object(str_tid); - CHECK(str_dtype, NULL, "H5I_object"); + CHECK_PTR(str_dtype, "H5I_object"); /* Verify the committed datatype message version */ VERIFY(str_dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], @@ -6676,7 +6676,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid) /* Get the internal datatype pointer */ dtype = (H5T_t *)H5I_object(dtid); - CHECK(dtype, NULL, "H5I_object"); + CHECK_PTR(dtype, "H5I_object"); /* Verify the dataset's datatype message version */ /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY: @@ -6809,7 +6809,7 @@ test_libver_bounds_attributes(hid_t fapl) /* Get the internal attribute pointer */ attr = (H5A_t *)H5I_object(aid); - CHECK(attr, NULL, "H5I_object"); + CHECK_PTR(attr, "H5I_object"); /* Verify the attribute version */ if (low == H5F_LIBVER_EARLIEST) @@ -6828,7 +6828,7 @@ test_libver_bounds_attributes(hid_t fapl) /* Get the internal attribute pointer */ attr = (H5A_t *)H5I_object(aid); - CHECK(attr, NULL, "H5I_object"); + CHECK_PTR(attr, "H5I_object"); /* Verify attribute version */ VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds"); @@ -6849,7 +6849,7 @@ test_libver_bounds_attributes(hid_t fapl) /* Get internal attribute pointer */ attr = (H5A_t *)H5I_object(aid); - CHECK(attr, NULL, "H5I_object"); + CHECK_PTR(attr, "H5I_object"); /* Verify attribute version */ if (low == H5F_LIBVER_EARLIEST) @@ -6914,7 +6914,7 @@ test_libver_bounds_attributes(hid_t fapl) /* Get the internal attribute pointer */ attr = (H5A_t *)H5I_object(aid); - CHECK(attr, NULL, "H5I_object"); + CHECK_PTR(attr, "H5I_object"); /* Verify the attribute version */ if (low == H5F_LIBVER_EARLIEST) @@ -6976,7 +6976,7 @@ test_libver_bounds_attributes(hid_t fapl) /* Get the internal file pointer */ f = (H5F_t *)H5I_object(fid); - CHECK(f, NULL, "H5I_object"); + CHECK_PTR(f, "H5I_object"); /* Open the group */ gid = H5Gopen2(fid, GRP_NAME, H5P_DEFAULT); @@ -6988,7 +6988,7 @@ test_libver_bounds_attributes(hid_t fapl) /* Get the internal attribute pointer */ attr = (H5A_t *)H5I_object(aid); - CHECK(attr, NULL, "H5I_object"); + CHECK_PTR(attr, "H5I_object"); /* Verify the attribute message version */ VERIFY(attr->shared->version, H5O_attr_ver_bounds[f->shared->low_bound], diff --git a/test/th5s.c b/test/th5s.c index 59bdffb..e698490 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -1233,7 +1233,7 @@ test_h5s_encode(void) if (sbuf_size > 0) { sbuf = (unsigned char *)HDcalloc((size_t)1, sbuf_size); - CHECK(sbuf, NULL, "HDcalloc"); + CHECK_PTR(sbuf, "HDcalloc"); } /* Try decoding bogus buffer */ @@ -1294,7 +1294,7 @@ test_h5s_encode(void) if (null_size > 0) { null_sbuf = (unsigned char *)HDcalloc((size_t)1, null_size); - CHECK(null_sbuf, NULL, "HDcalloc"); + CHECK_PTR(null_sbuf, "HDcalloc"); } /* Encode the null dataspace in the buffer */ @@ -1330,7 +1330,7 @@ test_h5s_encode(void) if (scalar_size > 0) { scalar_buf = (unsigned char *)HDcalloc((size_t)1, scalar_size); - CHECK(scalar_buf, NULL, "HDcalloc"); + CHECK_PTR(scalar_buf, "HDcalloc"); } /* Encode the scalar dataspace in the buffer */ @@ -2494,7 +2494,7 @@ test_versionbounds(void) /* Its version should be H5O_SDSPACE_VERSION_1 */ spacep = (H5S_t *)H5I_object(space); - CHECK(spacep, NULL, "H5I_object"); + CHECK_PTR(spacep, "H5I_object"); VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound"); /* Set high bound to V18 */ @@ -2515,7 +2515,7 @@ test_versionbounds(void) dset_space = H5Dget_space(dset); CHECK(dset_space, FAIL, "H5Dget_space"); spacep = (H5S_t *)H5I_object(dset_space); - CHECK(spacep, NULL, "H5I_object"); + CHECK_PTR(spacep, "H5I_object"); /* Dataspace version should remain as H5O_SDSPACE_VERSION_1 */ VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound"); @@ -2552,7 +2552,7 @@ test_versionbounds(void) dset_space = H5Dget_space(dset); CHECK(dset_space, FAIL, "H5Dget_space"); spacep = (H5S_t *)H5I_object(dset_space); - CHECK(spacep, NULL, "H5I_object"); + CHECK_PTR(spacep, "H5I_object"); /* Verify the dataspace version */ VERIFY(spacep->extent.version, H5O_sdspace_ver_bounds[low], "upgraded dataspace version"); @@ -513,7 +513,7 @@ test_id_type_list(void) /* Sanity check */ if ((int)startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES) { /* Error condition, throw an error */ - CHECK(1, 1, "H5Iregister_type"); + ERROR("H5Iregister_type"); goto out; } /* Create types up to H5I_MAX_NUM_TYPES */ diff --git a/test/titerate.c b/test/titerate.c index a0f763c..faabf14 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -947,7 +947,7 @@ test_links(hid_t fapl) else if (!HDstrcmp(obj_name, "softlink")) VERIFY(linfo.type, H5L_TYPE_SOFT, "H5Lget_name_by_idx"); else - CHECK(0, 0, "unknown object name"); + ERROR("unknown object name"); } /* end for */ ret = H5Gclose(gid); diff --git a/test/tvltypes.c b/test/tvltypes.c index f8734b6..17b93ad 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -2508,8 +2508,8 @@ test_vltypes_fill_value(void) hid_t large_dspace_id; /* Dataspace ID for large datasets */ hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */ hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */ - hid_t dset_dspace_id; /* Dataspace ID for a particular dataset */ - hid_t dset_select_dspace_id; /* Dataspace ID for selection in a particular dataset */ + hid_t dset_dspace_id = -1; /* Dataspace ID for a particular dataset */ + hid_t dset_select_dspace_id = -1; /* Dataspace ID for selection in a particular dataset */ hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */ hid_t single_dspace_id; /* Dataspace ID for single element selection */ hsize_t single_offset[] = {2}; /* Offset of single element selection */ @@ -2525,8 +2525,8 @@ test_vltypes_fill_value(void) hid_t dset_id; hsize_t small_dims[] = {SPACE4_DIM_SMALL}; hsize_t large_dims[] = {SPACE4_DIM_LARGE}; - size_t dset_elmts; /* Number of elements in a particular dataset */ - const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead", + size_t dset_elmts = 0; /* Number of elements in a particular dataset */ + const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead", 3, 4.0F, 100.0F, 1.0F, "liquid", "meter"}; const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0F, 200.0F, 2.0F, "solid", "yard"}; dtype1_struct * rbuf = NULL; /* Buffer for reading data */ |