diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 14:31:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 14:31:56 (GMT) |
commit | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch) | |
tree | 44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /tools | |
parent | 622fcbd13881fbc58bbeaed3062583b759f5e864 (diff) | |
download | hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.zip hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.gz hdf5-7a44581a84778a1346a2fd5b6cca7d9db905a321.tar.bz2 |
Rename HDassert() to assert() (#3191)
* Change HDassert to assert
* Fix bin/make_err
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff_array.c | 10 | ||||
-rw-r--r-- | tools/lib/h5tools_dump.c | 64 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 20 | ||||
-rw-r--r-- | tools/lib/io_timer.c | 4 | ||||
-rw-r--r-- | tools/libtest/h5tools_test_utils.c | 16 | ||||
-rw-r--r-- | tools/src/h5perf/sio_engine.c | 16 | ||||
-rw-r--r-- | tools/src/h5perf/sio_perf.c | 2 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_copy.c | 6 | ||||
-rw-r--r-- | tools/src/h5stat/h5stat.c | 10 | ||||
-rw-r--r-- | tools/src/misc/h5debug.c | 18 | ||||
-rw-r--r-- | tools/test/h5diff/h5diffgentest.c | 20 | ||||
-rw-r--r-- | tools/test/h5dump/h5dumpgentest.c | 944 | ||||
-rw-r--r-- | tools/test/h5repack/h5repacktst.c | 36 | ||||
-rw-r--r-- | tools/test/perform/iopipe.c | 32 |
14 files changed, 599 insertions, 599 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index c554160..5cb22f1 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -224,7 +224,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_ case H5T_NCLASSES: default: H5TOOLS_DEBUG("type_class:INVALID"); - HDassert(0); + assert(0); break; /*------------------------------------------------------------------------- @@ -707,7 +707,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co size = H5Tget_size(arr_opts.m_tid); ndims = H5Tget_array_ndims(opts->m_tid); H5Tget_array_dims2(opts->m_tid, adims); - HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK); + assert(ndims >= 1 && ndims <= H5S_MAX_RANK); H5TOOLS_DEBUG("attr ph=%d", arr_opts.print_header); /* calculate the number of array elements */ @@ -1386,9 +1386,9 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di */ if (nblocks1 > 0) { H5TOOLS_DEBUG("region compare blocks"); - HDassert(ndims1 > 0); + assert(ndims1 > 0); alloc_size = (hsize_t)nblocks1 * (unsigned)ndims1 * 2 * sizeof(ptdata1[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ if ((ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) { opts->err_stat = H5DIFF_ERR; @@ -1460,7 +1460,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di if (npoints1 > 0) { H5TOOLS_DEBUG("region compare points"); alloc_size = (hsize_t)npoints1 * (unsigned)ndims1 * sizeof(ptdata1[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ if ((ptdata1 = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) { opts->err_stat = H5DIFF_ERR; diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index d444c8c..1273065 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -344,9 +344,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format hbool_t past_catch = FALSE; hbool_t ret_value = TRUE; - HDassert(info); - HDassert(ctx); - HDassert(buffer); + assert(info); + assert(ctx); + assert(buffer); outputformat = *info; outputformat.idx_fmt = ""; @@ -497,10 +497,10 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for void *region_buf = NULL; int ret_value = 0; - HDassert(info); - HDassert(cur_ctx); - HDassert(buffer); - HDassert(ptdata); + assert(info); + assert(cur_ctx); + assert(buffer); + assert(ptdata); HDmemset(&ctx, 0, sizeof(ctx)); @@ -674,9 +674,9 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea hbool_t past_catch = FALSE; hbool_t ret_value = TRUE; - HDassert(info); - HDassert(ctx); - HDassert(buffer); + assert(info); + assert(ctx); + assert(buffer); H5TOOLS_START_DEBUG(" "); outputformat = *info; @@ -712,7 +712,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea h5tools_str_append(buffer, "REGION_TYPE BLOCK "); alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ if ((ptdata = (hsize_t *)HDmalloc((size_t)alloc_size)) == NULL) H5TOOLS_GOTO_ERROR(dimension_break, "Could not allocate buffer for ptdata"); @@ -893,11 +893,11 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre hbool_t past_catch = FALSE; int ret_value = 0; - HDassert(info); - HDassert(cur_ctx); - HDassert(buffer); - HDassert(ptdata); - HDassert(ndims > 0); + assert(info); + assert(cur_ctx); + assert(buffer); + assert(ptdata); + assert(ndims > 0); H5TOOLS_START_DEBUG(" "); @@ -1033,9 +1033,9 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea hbool_t past_catch = FALSE; hbool_t ret_value = TRUE; - HDassert(info); - HDassert(ctx); - HDassert(buffer); + assert(info); + assert(ctx); + assert(buffer); H5TOOLS_START_DEBUG(" "); outputformat = *info; @@ -1071,7 +1071,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea h5tools_str_append(buffer, "REGION_TYPE POINT "); alloc_size = npoints * ndims * sizeof(ptdata[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) H5TOOLS_GOTO_ERROR(dimension_break, "Could not allocate buffer for ptdata"); @@ -1317,10 +1317,10 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c size = 1; sm_size[i - 1] = MIN(total_size[i - 1], size); sm_nbytes *= sm_size[i - 1]; - HDassert(sm_nbytes > 0); + assert(sm_nbytes > 0); } - HDassert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/ + assert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/ if (NULL == (sm_buf = (unsigned char *)HDmalloc((size_t)sm_nelmts * p_type_nbytes))) H5TOOLS_THROW(FAIL, "Could not allocate buffer for strip-mine"); @@ -1699,7 +1699,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont if (!sm_nbytes) goto done; - HDassert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/ + assert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/ if (NULL != (sm_buf = (unsigned char *)HDmalloc((size_t)sm_nbytes))) { H5TOOLS_DEBUG("stripmine size:%ld", sm_nbytes); @@ -1848,7 +1848,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte vl_data = TRUE; alloc_size = p_nelmts * H5Tget_size(p_type); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ if (NULL != (buf = (unsigned char *)HDmalloc((size_t)alloc_size))) { H5TOOLS_DEBUG("ctx->ndims:%d", ctx->ndims); @@ -2747,7 +2747,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i if ((snmembs = H5Tget_nmembers(type)) < 0) H5TOOLS_THROW((-1), "H5Tget_nmembers failed"); nmembs = (unsigned)snmembs; - HDassert(nmembs > 0); + assert(nmembs > 0); if ((super = H5Tget_super(type)) < 0) H5TOOLS_THROW((-1), "H5Tget_super failed"); @@ -3382,12 +3382,12 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * ctx->indent_level++; ssize_out = H5Pget_virtual_filename(dcpl_id, curr_vmap, NULL, 0); - HDassert(ssize_out > 0); - HDassert((size_t)ssize_out < sizeof(name)); + assert(ssize_out > 0); + assert((size_t)ssize_out < sizeof(name)); H5Pget_virtual_filename(dcpl_id, curr_vmap, name, sizeof(name)); ssize_out = H5Pget_virtual_dsetname(dcpl_id, curr_vmap, NULL, 0); - HDassert(ssize_out > 0); - HDassert((size_t)ssize_out < sizeof(name)); + assert(ssize_out > 0); + assert((size_t)ssize_out < sizeof(name)); H5Pget_virtual_dsetname(dcpl_id, curr_vmap, dsetname, sizeof(dsetname)); ctx->need_prefix = TRUE; @@ -3660,7 +3660,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * break; case H5D_FILL_TIME_ERROR: default: - HDassert(0); + assert(0); break; } h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3684,7 +3684,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * break; case H5D_FILL_VALUE_ERROR: default: - HDassert(0); + assert(0); break; } h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); @@ -3726,7 +3726,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t * case H5D_ALLOC_TIME_ERROR: case H5D_ALLOC_TIME_DEFAULT: default: - HDassert(0); + assert(0); break; } h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index a3a6995..a923a52 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -149,9 +149,9 @@ h5tools_str_append(h5tools_str_t *str /*in,out*/, const char *fmt, ...) * Allocate at least twice as much space and try again. */ size_t newsize = MAX(str->len + (size_t)nchars + 1, 2 * str->nalloc); - HDassert(newsize > str->nalloc); /*overflow*/ + assert(newsize > str->nalloc); /*overflow*/ str->s = (char *)HDrealloc(str->s, newsize); - HDassert(str->s); + assert(str->s); str->nalloc = newsize; } else { @@ -184,7 +184,7 @@ h5tools_str_reset(h5tools_str_t *str /*in,out*/) if (!str->s || str->nalloc <= 0) { str->nalloc = STR_INIT_LEN; str->s = (char *)HDmalloc(str->nalloc); - HDassert(str->s); + assert(str->s); } str->s[0] = '\0'; @@ -238,8 +238,8 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt) { char _temp[1024], *temp = _temp; - HDassert(str); - HDassert(fmt); + assert(str); + assert(fmt); /* If the format string is simply "%s" then don't bother doing anything */ if (!HDstrcmp(fmt, "%s")) @@ -254,7 +254,7 @@ h5tools_str_fmt(h5tools_str_t *str /*in,out*/, size_t start, const char *fmt) if (str->len - start + 1 > n) { n = str->len - start + 1; temp = (char *)HDmalloc(n); - HDassert(temp); + assert(temp); } HDstrncpy(temp, str->s + start, n - 1); @@ -471,7 +471,7 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_for nblocks = (hsize_t)snblocks; alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ ptdata = (hsize_t *)HDmalloc((size_t)alloc_size); H5Sget_select_hyper_blocklist(rspace, (hsize_t)0, nblocks, ptdata); @@ -532,7 +532,7 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_for npoints = (hsize_t)snpoints; alloc_size = npoints * ndims * sizeof(ptdata[0]); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ ptdata = (hsize_t *)HDmalloc((size_t)alloc_size); H5Sget_select_elem_pointlist(rspace, (hsize_t)0, npoints, ptdata); @@ -1267,13 +1267,13 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai size = H5Tget_size(memb); ndims = H5Tget_array_ndims(type); H5Tget_array_dims2(type, dims); - HDassert(ndims >= 1 && ndims <= H5S_MAX_RANK); + assert(ndims >= 1 && ndims <= H5S_MAX_RANK); /* Calculate the number of array elements */ for (k = 0, nelmts = 1; k < ndims; k++) { temp_nelmts = nelmts; temp_nelmts *= dims[k]; - HDassert(temp_nelmts == (hsize_t)((size_t)temp_nelmts)); + assert(temp_nelmts == (hsize_t)((size_t)temp_nelmts)); nelmts = (size_t)temp_nelmts; } /* Print the opening bracket */ diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index 6a8d091..d565264 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -125,7 +125,7 @@ io_time_t * io_time_set(io_time_t *pt, timer_type t, int start_stop) { /* sanity check */ - HDassert(pt); + assert(pt); switch (pt->type) { #ifdef H5_HAVE_PARALLEL @@ -214,7 +214,7 @@ H5_ATTR_PURE double io_time_get(io_time_t *pt, timer_type t) { /* sanity check */ - HDassert(pt); + assert(pt); return pt->total_time[t]; } diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index f060e2c..5fc5dc1 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -532,8 +532,8 @@ test_parse_tuple(void) /* SETUP */ - HDassert(parsed == NULL); - HDassert(cpy == NULL); + assert(parsed == NULL); + assert(cpy == NULL); tc = cases[i]; if (show_progress == TRUE) { HDprintf("testing %d: %s...\n", i, tc.test_msg); @@ -551,8 +551,8 @@ test_parse_tuple(void) JSVERIFY_STR(tc.exp_elems[elem_i], parsed[elem_i], NULL) } /* TEARDOWN */ - HDassert(parsed != NULL); - HDassert(cpy != NULL); + assert(parsed != NULL); + assert(cpy != NULL); HDfree(parsed); parsed = NULL; HDfree(cpy); @@ -623,7 +623,7 @@ test_populate_ros3_fa(void) show_progress = TRUE; #endif /* H5TOOLS_UTILS_TEST_DEBUG */ - HDassert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION); + assert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION); /********* * TESTS * @@ -747,7 +747,7 @@ test_populate_ros3_fa(void) HDprintf("region overflow\n"); } - HDassert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN); + assert(HDstrlen(values[0]) > H5FD_ROS3_MAX_REGION_LEN); JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl") JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL) @@ -817,7 +817,7 @@ test_populate_ros3_fa(void) HDprintf("id overflow\n"); } - HDassert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN); + assert(HDstrlen(values[1]) > H5FD_ROS3_MAX_SECRET_ID_LEN); JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl") JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL) @@ -924,7 +924,7 @@ test_populate_ros3_fa(void) HDprintf("key overflow\n"); } - HDassert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN); + assert(HDstrlen(values[2]) > H5FD_ROS3_MAX_SECRET_KEY_LEN); JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl") JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.version, NULL) diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index b80189b..ca7d4ae 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -263,7 +263,7 @@ done: break; default: /* unknown request */ - HDassert(0 && "Unknown IO type"); + assert(0 && "Unknown IO type"); break; } @@ -311,7 +311,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si default: /* unknown request */ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); - HDassert(0 && "Unknown IO type"); + assert(0 && "Unknown IO type"); break; } @@ -660,7 +660,7 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer) for (k = 0; k < parms->rank; k++) { - HDassert(h5offset[k] >= 0); + assert(h5offset[k] >= 0); if (dims[k] <= (hsize_t)h5offset[k]) { dims[k] = dims[k] + h5count[k]; hrc = H5Sset_extent_simple(h5dset_space_id, parms->rank, dims, maxdims); @@ -684,7 +684,7 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer) default: /* unknown request */ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); - HDassert(0 && "Unknown IO type"); + assert(0 && "Unknown IO type"); break; } /* switch (parms->io_type) */ } @@ -982,7 +982,7 @@ dset_read(int local_dim, file_descr *fd, parameters *parms, void *buffer, const default: /* unknown request */ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); - HDassert(0 && "Unknown IO type"); + assert(0 && "Unknown IO type"); break; } /* switch (parms->io_type) */ } @@ -1167,7 +1167,7 @@ set_vfd(parameters *param) HDmemset(memb_name, 0, sizeof memb_name); HDmemset(memb_addr, 0, sizeof memb_addr); - HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); + assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); if (NULL == (sv = HDcalloc(1, sizeof(*sv)))) return -1; @@ -1310,7 +1310,7 @@ do_cleanupfile(iotype iot, char *filename) } else if (driver == H5FD_MULTI) { H5FD_mem_t mt; - HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); + assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { HDsnprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]); @@ -1326,7 +1326,7 @@ do_cleanupfile(iotype iot, char *filename) default: /* unknown request */ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); - HDassert(0 && "Unknown IO type"); + assert(0 && "Unknown IO type"); break; } } diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index bf70fc3..870318e 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -328,7 +328,7 @@ run_test(iotype iot, parameters parms, struct options *opts) default: /* unknown request */ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); - HDassert(0 && "Unknown IO tpe"); + assert(0 && "Unknown IO tpe"); break; } diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 5275481..59dc59e 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -1654,13 +1654,13 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size) } while (-1 == nwritten && EINTR == errno); if (-1 == nwritten) /* error */ H5TOOLS_GOTO_ERROR((-1), "HDwrite failed"); - HDassert(nwritten > 0); - HDassert(nwritten <= nbytes); + assert(nwritten > 0); + assert(nwritten <= nbytes); /* Update # of bytes left & offset in buffer */ nbytes -= nwritten; wbuf += nwritten; - HDassert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE)); + assert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE)); } /* end while */ /* Update size of userblock left to transfer */ diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 495954e..021529e 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -308,7 +308,7 @@ attribute_stats(iter_t *iter, const H5O_info2_t *oi, const H5O_native_info_t *na bin = ceil_log10((unsigned long)oi->num_attrs); if ((bin + 1) > iter->attr_nbins) { iter->attr_bins = (unsigned long *)HDrealloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long)); - HDassert(iter->attr_bins); + assert(iter->attr_bins); /* Initialize counts for intermediate bins */ while (iter->attr_nbins < bin) @@ -742,7 +742,7 @@ freespace_stats(hid_t fid, iter_t *iter) if (NULL == (sect_info = (H5F_sect_info_t *)HDcalloc((size_t)nsects, sizeof(H5F_sect_info_t)))) return (FAIL); nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, (size_t)nsects, sect_info); - HDassert(nsects); + assert(nsects); } /* end else-if */ for (u = 0; u < (size_t)nsects; u++) { @@ -756,7 +756,7 @@ freespace_stats(hid_t fid, iter_t *iter) if (bin >= iter->sect_nbins) { /* Allocate more storage for section info */ iter->sect_bins = (unsigned long *)HDrealloc(iter->sect_bins, (bin + 1) * sizeof(unsigned long)); - HDassert(iter->sect_bins); + assert(iter->sect_bins); /* Initialize counts for intermediate bins */ while (iter->sect_nbins < bin) @@ -1720,7 +1720,7 @@ main(int argc, char *argv[]) if (H5Fget_filesize(fid, &iter.filesize) < 0) warn_msg("Unable to retrieve file size\n"); - HDassert(iter.filesize != 0); + assert(iter.filesize != 0); /* Get storage info for file-level structures */ if (H5Fget_info2(fid, &finfo) < 0) @@ -1754,7 +1754,7 @@ main(int argc, char *argv[]) if (H5Pget_file_space_strategy(fcpl, &iter.fs_strategy, &iter.fs_persist, &iter.fs_threshold) < 0) warn_msg("Unable to retrieve file space information\n"); - HDassert(iter.fs_strategy >= 0 && iter.fs_strategy < H5F_FSPACE_STRATEGY_NTYPES); + assert(iter.fs_strategy >= 0 && iter.fs_strategy < H5F_FSPACE_STRATEGY_NTYPES); if (H5Pget_file_space_page_size(fcpl, &iter.fsp_size) < 0) warn_msg("Unable to retrieve file space page size\n"); diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index b15ae09..0d268c6 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -468,7 +468,7 @@ main(int argc, char *argv[]) * Debug a v2 B-tree header. */ const H5B2_class_t *cls = get_H5B2_class(sig); - HDassert(cls); + assert(cls); if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra_count == 0 || extra[0] == 0)) { HDfprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the " @@ -486,7 +486,7 @@ main(int argc, char *argv[]) * Debug a v2 B-tree internal node. */ const H5B2_class_t *cls = get_H5B2_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && @@ -522,7 +522,7 @@ main(int argc, char *argv[]) * Debug a v2 B-tree leaf node. */ const H5B2_class_t *cls = get_H5B2_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && @@ -649,7 +649,7 @@ main(int argc, char *argv[]) * Debug an extensible array header. */ const H5EA_class_t *cls = get_H5EA_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0) { @@ -670,7 +670,7 @@ main(int argc, char *argv[]) * Debug an extensible array index block. */ const H5EA_class_t *cls = get_H5EA_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { @@ -691,7 +691,7 @@ main(int argc, char *argv[]) * Debug an extensible array super block. */ const H5EA_class_t *cls = get_H5EA_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) { @@ -711,7 +711,7 @@ main(int argc, char *argv[]) * Debug an extensible array data block. */ const H5EA_class_t *cls = get_H5EA_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) { @@ -732,7 +732,7 @@ main(int argc, char *argv[]) * Debug a fixed array header. */ const H5FA_class_t *cls = get_H5FA_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0) { @@ -752,7 +752,7 @@ main(int argc, char *argv[]) * Debug a fixed array data block. */ const H5FA_class_t *cls = get_H5FA_class(sig); - HDassert(cls); + assert(cls); /* Check for enough valid parameters */ if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) { diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index bd1a50f..58a8685 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -8058,9 +8058,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -8512,7 +8512,7 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) sid1 = H5Screate_simple(2, dims1, NULL); did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); - HDassert(status >= 0); + assert(status >= 0); /* create the reference dataset */ sid2 = H5Screate_simple(1, dims2, NULL); @@ -8533,12 +8533,12 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) } status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); - HDassert(status >= 0); + assert(status >= 0); H5Sget_select_npoints(sid1); /* store first dataset region */ status = H5Rcreate(&rbuf[0], fid, "dsetref", H5R_DATASET_REGION, sid1); - HDassert(status >= 0); + assert(status >= 0); /* select sequence of five points for second reference */ coord[0][0] = 6; @@ -8567,17 +8567,17 @@ gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) /* write */ status = H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf); - HDassert(status >= 0); + assert(status >= 0); /* close, free memory buffers */ status = H5Dclose(did1); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(sid1); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did2); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(sid2); - HDassert(status >= 0); + assert(status >= 0); HDfree(rbuf); HDfree(buf); diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index ba4f0a4..2341a04 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -1750,9 +1750,9 @@ gent_many(void) /* Create links to external and UD links */ ret = H5Lcreate_soft("/g8/elink", fid, "/g7/slink5", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Lcreate_soft("/g8/udlink", fid, "/g7/slink6", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); H5Fclose(fid); } @@ -2707,16 +2707,16 @@ gent_vldatatypes(void) type = H5Tvlen_create(H5T_NATIVE_INT); dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(type, space, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); /* Allocate and initialize VL dataset to write */ for (i = 0; i < SPACE1_DIM1; i++) { @@ -2734,16 +2734,16 @@ gent_vldatatypes(void) type = H5Tvlen_create(H5T_NATIVE_FLOAT); dset = H5Dcreate2(file, "Dataset2.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(type, space, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); /* Allocate and initialize a scalar VL dataset to write */ adata.p = HDmalloc(37 * sizeof(int)); @@ -2757,18 +2757,18 @@ gent_vldatatypes(void) type = H5Tvlen_create(H5T_NATIVE_INT); dset = H5Dcreate2(file, "Dataset3.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &adata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(type, space, H5P_DEFAULT, &adata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(file); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -2821,23 +2821,23 @@ gent_vldatatypes2(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -2881,34 +2881,34 @@ gent_vldatatypes3(void) /* Insert fields */ ret = H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tinsert(tid2, "f", HOFFSET(s1, f), H5T_NATIVE_FLOAT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tinsert(tid2, "v", HOFFSET(s1, v), tid1); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid2, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid2, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -2948,9 +2948,9 @@ gent_vldatatypes4(void) /* Insert fields */ ret = H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tinsert(tid2, "f", HOFFSET(s1, f), H5T_NATIVE_FLOAT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a datatype to refer to */ tid1 = H5Tvlen_create(tid2); @@ -2960,23 +2960,23 @@ gent_vldatatypes4(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } /* Generate a variable-length dataset with NULL values in it */ @@ -3008,37 +3008,37 @@ gent_vldatatypes5(void) /* Create file */ fid1 = H5Fcreate(FILE43, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid1 > 0); + assert(fid1 > 0); /* Create dataspace for datasets */ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL); - HDassert(sid1 > 0); + assert(sid1 > 0); /* Create a datatype to refer to */ tid1 = H5Tvlen_create(H5T_NATIVE_UINT); - HDassert(tid1 > 0); + assert(tid1 > 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, F43_DSETNAME, tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(dataset > 0); + assert(dataset > 0); ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } /* This is big enough to make h5dump to use hyperslap to read @@ -3104,7 +3104,7 @@ gent_array1_big(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /*--------------------------- * Region Reference dataset @@ -3128,13 +3128,13 @@ gent_array1_big(void) /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); /* Release memory */ HDfree(wbuf); @@ -3173,17 +3173,17 @@ gent_array1(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3220,17 +3220,17 @@ gent_array2(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3272,19 +3272,19 @@ gent_array3(void) /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3323,35 +3323,35 @@ gent_array4(void) /* Insert integer field */ ret = H5Tinsert(tid2, "i", HOFFSET(s2_t, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); /* Insert float field */ ret = H5Tinsert(tid2, "f", HOFFSET(s2_t, f), H5T_NATIVE_FLOAT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array datatype to refer to */ tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close compound datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3392,42 +3392,42 @@ gent_array5(void) /* Insert integer field */ ret = H5Tinsert(tid2, "i", HOFFSET(s2_t, i), H5T_NATIVE_INT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array of floats datatype */ tid3 = H5Tarray_create2(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1); /* Insert float array field */ ret = H5Tinsert(tid2, "f", HOFFSET(s2_t, f), tid3); - HDassert(ret >= 0); + assert(ret >= 0); /* Close array of floats field datatype */ ret = H5Tclose(tid3); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array datatype to refer to */ tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close compound datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3467,28 +3467,28 @@ gent_array6(void) /* Close VL datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3531,35 +3531,35 @@ gent_array7(void) /* Close nested array datatype */ ret = H5Tclose(tid3); - HDassert(ret >= 0); + assert(ret >= 0); /* Create an array datatype to refer to */ tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close VL datatype */ ret = H5Tclose(tid2); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write dataset to disk */ ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Reclaim the write VL data */ ret = H5Treclaim(tid1, sid1, H5P_DEFAULT, wdata); - HDassert(ret >= 0); + assert(ret >= 0); /* Close Dataset */ ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid1); - HDassert(ret >= 0); + assert(ret >= 0); } /* Test the boundary of the display output buffer at the reallocation event */ @@ -3578,7 +3578,7 @@ gent_array8(void) /* Allocate data buffer */ wdata = (int *)HDmalloc(F64_DIM1 * sizeof(int)); - HDassert(wdata); + assert(wdata); /* * Initialize data. i is the element in the dataspace, j and k the @@ -3610,20 +3610,20 @@ gent_array8(void) dset = H5Dcreate2(file, F64_DATASET, filetype, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (dset >= 0) status = H5Dwrite(dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); - HDassert(status >= 0); + assert(status >= 0); } /* * Close and release resources. */ status = H5Dclose(dset); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(filetype); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(file); - HDassert(status >= 0); + assert(status >= 0); HDfree(wdata); } @@ -3648,30 +3648,30 @@ gent_empty(void) dset = H5Dcreate2(file, "Dataset1.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty native integer dataset dataset */ dset = H5Dcreate2(file, "Dataset2.0", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty native floating-point dataset dataset */ dset = H5Dcreate2(file, "Dataset3.0", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty array dataset */ type = H5Tarray_create2(H5T_NATIVE_INT, SPACE1_RANK, dims); dset = H5Dcreate2(file, "Dataset4.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); /* write out an empty compound dataset */ type = H5Tcreate(H5T_COMPOUND, sizeof(empty_struct)); @@ -3681,15 +3681,15 @@ gent_empty(void) dset = H5Dcreate2(file, "Dataset5.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(type); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(space); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(file); - HDassert(ret >= 0); + assert(ret >= 0); } static void @@ -3881,7 +3881,7 @@ gent_multi(void) HDmemset(memb_name, 0, sizeof memb_name); HDmemset(memb_addr, 0, sizeof memb_addr); - HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); + assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { memb_fapl[mt] = H5P_DEFAULT; @@ -4168,9 +4168,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(aid, tid, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(aid); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4277,9 +4277,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(aid, tid, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(aid); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4408,9 +4408,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(aid, tid, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(aid); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4597,9 +4597,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf5); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4705,9 +4705,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf52); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4842,9 +4842,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, /* for saving reference to da tid = H5Tvlen_create(H5T_NATIVE_INT); did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Treclaim(tid, sid, H5P_DEFAULT, buf53); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(did); status = H5Tclose(tid); status = H5Sclose(sid); @@ -4915,7 +4915,7 @@ gent_attr_all(void) sid = H5Screate_simple(1, dims, NULL); did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Sclose(sid); - HDassert(status >= 0); + assert(status >= 0); /* Create groups */ group_id = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -4940,17 +4940,17 @@ gent_attr_all(void) /* Close */ status = H5Dclose(did); - HDassert(status >= 0); + assert(status >= 0); status = H5Gclose(group_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Gclose(group2_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Gclose(root_id); - HDassert(status >= 0); + assert(status >= 0); /* Close file */ status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); } /*------------------------------------------------------------------------- @@ -5091,65 +5091,65 @@ gent_compound_complex(void) /* Create the dataspace */ dataspace = H5Screate_simple(F41_RANK, dim, NULL); - HDassert(dataspace >= 0); + assert(dataspace >= 0); /* Create the file */ datafile = H5Fcreate(FILE41, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(datafile >= 0); + assert(datafile >= 0); /* Copy the array data type for the string array */ array_tid = H5Tcopy(H5T_C_S1); - HDassert(array_tid >= 0); + assert(array_tid >= 0); /* Set the string array size to Variable */ status = H5Tset_size(array_tid, H5T_VARIABLE); - HDassert(status >= 0); + assert(status >= 0); /* Create the array data type for the string array */ str_array_id = H5Tarray_create2(array_tid, F41_ARRAY_RANK, array_dimb); - HDassert(str_array_id >= 0); + assert(str_array_id >= 0); /* Copy the array data type for the character array */ array1_tid = H5Tcopy(H5T_C_S1); - HDassert(array1_tid >= 0); + assert(array1_tid >= 0); /* Set the character array size */ status = H5Tset_size(array1_tid, F41_ARRAY_DIMc); - HDassert(status >= 0); + assert(status >= 0); /* Create the array data type for the character array */ array2_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F41_ARRAY_RANKd, array_dimd); - HDassert(array2_tid >= 0); + assert(array2_tid >= 0); /* Create the array data type for the character array */ array4_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK, array_dimf); - HDassert(array4_tid >= 0); + assert(array4_tid >= 0); /* Create the memory data type */ Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); - HDassert(Array1Structid >= 0); + assert(Array1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, "a_name", HOFFSET(Array1Struct, a), H5T_NATIVE_INT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "b_name", HOFFSET(Array1Struct, b), str_array_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "c_name", HOFFSET(Array1Struct, c), array1_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "d_name", HOFFSET(Array1Struct, d), array2_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "e_name", HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "f_name", HOFFSET(Array1Struct, f), array4_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, "g_name", HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(datafile, F41_DATASETNAME, Array1Structid, dataspace, H5P_DEFAULT, H5P_DEFAULT, @@ -5157,35 +5157,35 @@ gent_compound_complex(void) /* Write data to the dataset */ status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Array1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array1_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array2_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array4_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(str_array_id); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(dataspace); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(datafile); - HDassert(status >= 0); + assert(status >= 0); } static void @@ -5202,7 +5202,7 @@ gent_named_dtype_attr(void) /* Create a file */ fid = H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid > 0); + assert(fid > 0); /*------------------------------------------------------------------------- * datatype @@ -5211,27 +5211,27 @@ gent_named_dtype_attr(void) /* Create a datatype to commit and use */ tid = H5Tcopy(H5T_NATIVE_INT); - HDassert(tid > 0); + assert(tid > 0); /* Commit datatype to file */ ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a hard link to the datatype */ ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* Create a scalar dataspace used for all objects */ sid = H5Screate(H5S_SCALAR); - HDassert(sid > 0); + assert(sid > 0); /* Create attribute on committed datatype */ aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + assert(aid > 0); /* Write data into the attribute */ ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset @@ -5240,15 +5240,15 @@ gent_named_dtype_attr(void) /* Create dataset */ did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(did > 0); + assert(did > 0); /* Create attribute on dataset */ aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + assert(aid > 0); /* Write data into the attribute */ ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * group @@ -5257,15 +5257,15 @@ gent_named_dtype_attr(void) /* Create a group */ gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid > 0); + assert(gid > 0); /* Create attribute on group */ aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(aid > 0); + assert(aid > 0); /* Write data into the attribute */ ret = H5Awrite(aid, H5T_NATIVE_INT, &data); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close @@ -5274,23 +5274,23 @@ gent_named_dtype_attr(void) /* Close attribute */ ret = H5Aclose(aid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close dataset */ ret = H5Dclose(did); - HDassert(ret >= 0); + assert(ret >= 0); /* Close dataspace */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close datatype */ ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close file */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5423,25 +5423,25 @@ make_external(hid_t fid) dcpl = H5Pcreate(H5P_DATASET_CREATE); ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size); - HDassert(ret >= 0); + assert(ret >= 0); sid = H5Screate_simple(1, cur_size, max_size); - HDassert(ret >= 0); + assert(ret >= 0); dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); H5Dclose(dsid); - HDassert(ret >= 0); + assert(ret >= 0); H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5477,7 +5477,7 @@ gent_filters(void) /* create a file */ fid = H5Fcreate(FILE44, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Check if we support comments in the current VOL connector */ H5VLquery_optional(fid, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_SET_COMMENT, &supports_comments); @@ -5494,40 +5494,40 @@ gent_filters(void) *------------------------------------------------------------------------- */ ret = H5Pset_layout(dcpl, H5D_COMPACT); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "compact", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "contiguous", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } ret = H5Pset_layout(dcpl, H5D_CHUNKED); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "chunked", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5537,7 +5537,7 @@ gent_filters(void) /* set up chunk */ ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * SZIP @@ -5547,14 +5547,14 @@ gent_filters(void) if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set szip data */ ret = H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "szip", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); } #endif /* H5_HAVE_FILTER_SZIP */ @@ -5565,14 +5565,14 @@ gent_filters(void) #if defined(H5_HAVE_FILTER_DEFLATE) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set deflate data */ ret = H5Pset_deflate(dcpl, 9); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "deflate", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); #endif /*------------------------------------------------------------------------- @@ -5582,14 +5582,14 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the shuffle filter */ ret = H5Pset_shuffle(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "shuffle", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * checksum @@ -5598,14 +5598,14 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the checksum filter */ ret = H5Pset_fletcher32(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fletcher32", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * nbit @@ -5614,16 +5614,16 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the checksum filter */ ret = H5Pset_nbit(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); tid = H5Tcopy(H5T_NATIVE_INT); H5Tset_precision(tid, H5Tget_size(tid) - 1); ret = make_dset(fid, "nbit", sid, tid, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * scaleoffset @@ -5632,14 +5632,14 @@ gent_filters(void) /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the scaleoffset filter */ ret = H5Pset_scaleoffset(dcpl, H5Z_SO_INT, (int)H5Tget_size(H5T_NATIVE_INT)); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "scaleoffset", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * all filters @@ -5647,37 +5647,37 @@ gent_filters(void) */ /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /* set the shuffle filter */ ret = H5Pset_shuffle(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); #ifdef H5_HAVE_FILTER_SZIP if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { szip_options_mask = H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK; /* set szip data */ ret = H5Pset_szip(dcpl, szip_options_mask, szip_pixels_per_block); - HDassert(ret >= 0); + assert(ret >= 0); } #endif /* H5_HAVE_FILTER_SZIP */ #if defined(H5_HAVE_FILTER_DEFLATE) /* set deflate data */ ret = H5Pset_deflate(dcpl, 5); - HDassert(ret >= 0); + assert(ret >= 0); #endif /* set the checksum filter */ ret = H5Pset_fletcher32(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /* set the nbit filter */ ret = H5Pset_nbit(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "all", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * user defined filter @@ -5685,20 +5685,20 @@ gent_filters(void) */ /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Zregister(H5Z_MYFILTER); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_filter(dcpl, MYFILTER_ID, 0, 0, NULL); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "myfilter", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * make an external dataset @@ -5711,27 +5711,27 @@ gent_filters(void) *------------------------------------------------------------------------- */ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "alloc_time_early", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_ALLOC_TIME_INCR *------------------------------------------------------------------------- */ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "alloc_time_incr", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_ALLOC_TIME_LATE *------------------------------------------------------------------------- */ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "alloc_time_late", sid, H5T_NATIVE_INT, dcpl, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * commit a H5G_TYPE type with a comment @@ -5739,28 +5739,28 @@ gent_filters(void) */ tid = H5Tcopy(H5T_STD_B8LE); ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); if (supports_comments & H5VL_OPT_QUERY_SUPPORTED) { ret = H5Oset_comment_by_name(fid, "mytype", "This is a committed datatype", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); } ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5825,7 +5825,7 @@ gent_fcontents(void) /* create a file */ fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); write_dset(fid, 1, dims, "dset", H5T_NATIVE_INT, buf); @@ -5851,27 +5851,27 @@ gent_fcontents(void) /* hard link to "dset" */ ret = H5Lcreate_hard(fid, "/dset", H5L_SAME_LOC, "dset3", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* hard link to "dset" */ ret = H5Lcreate_hard(fid, "/dset", H5L_SAME_LOC, "dset4", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* soft link to itself */ ret = H5Lcreate_soft("mylink", fid, "mylink", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* soft link to "dset" */ ret = H5Lcreate_soft("/dset", fid, "softlink", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* dangling external link */ ret = H5Lcreate_external("fname", "oname", fid, "extlink", H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /* dangling udlink */ ret = H5Lcreate_ud(fid, "udlink", (H5L_type_t)MY_LINKCLASS, NULL, 0, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * datatypes @@ -5879,19 +5879,19 @@ gent_fcontents(void) */ tid = H5Tcopy(H5T_NATIVE_INT); ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /* no name datatype */ tid = H5Tcopy(H5T_NATIVE_INT); ret = H5Tcommit2(fid, "mytype2", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); write_dset(fid, 1, dims, "dsetmytype2", tid, buf); ret = H5Ldelete(fid, "mytype2", H5P_DEFAULT); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close @@ -5899,14 +5899,14 @@ gent_fcontents(void) */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); /* create a file for the bootblock test */ fid = H5Fcreate(FILE47, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -5943,7 +5943,7 @@ gent_fvalues(void) /* create a file */ fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* create a space */ sid = H5Screate_simple(1, dims, NULL); @@ -5957,42 +5957,42 @@ gent_fvalues(void) *------------------------------------------------------------------------- */ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_time_ifset", sid, H5T_NATIVE_INT, dcpl, buf); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_FILL_TIME_NEVER *------------------------------------------------------------------------- */ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_time_never", sid, H5T_NATIVE_INT, dcpl, buf); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * H5D_FILL_TIME_ALLOC *------------------------------------------------------------------------- */ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_time_alloc", sid, H5T_NATIVE_INT, dcpl, buf); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset with no fill value @@ -6009,13 +6009,13 @@ gent_fvalues(void) H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR); H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE); ret = H5Pset_fill_value(dcpl, tid, &fillval2); - HDassert(ret >= 0); + assert(ret >= 0); ret = make_dset(fid, "fill_compound", sid, tid, dcpl, buf2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset with a H5T_VLEN fill value @@ -6035,17 +6035,17 @@ gent_fvalues(void) fillval3.p = NULL; fillval3.len = 0; ret = H5Pset_fill_value(dcpl, tid, &fillval3); - HDassert(ret >= 0); + assert(ret >= 0); did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Treclaim(tid, sid, H5P_DEFAULT, buf3); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(did); ret = H5Tclose(tid); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * dataset with a H5T_ARRAY fill value @@ -6060,9 +6060,9 @@ gent_fvalues(void) *------------------------------------------------------------------------- */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -6105,7 +6105,7 @@ gent_string(void) /* create a file */ fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /*------------------------------------------------------------------------- * str1 @@ -6114,11 +6114,11 @@ gent_string(void) tid = H5Tcopy(H5T_C_S1); ret = H5Tset_size(tid, sizeof(buf1)); - HDassert(ret >= 0); + assert(ret >= 0); write_dset(fid, 1, dims1, "str1", tid, buf1); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * str2 @@ -6127,16 +6127,16 @@ gent_string(void) sid = H5Screate_simple(SPACE1_RANK, dims2, NULL); tid = H5Tcopy(H5T_C_S1); ret = H5Tset_size(tid, H5T_VARIABLE); - HDassert(ret >= 0); + assert(ret >= 0); did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Dclose(did); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * str3 @@ -6149,13 +6149,13 @@ gent_string(void) H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT); H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid); ret = make_dset(fid, "str3", sid, tid, H5P_DEFAULT, &buf3); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Tclose(str_tid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * str4 @@ -6164,14 +6164,14 @@ gent_string(void) sid = H5Screate_simple(SPACE1_RANK, dims4, NULL); ret = make_dset(fid, "str4", sid, H5T_NATIVE_CHAR, H5P_DEFAULT, buf4); ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -6215,7 +6215,7 @@ gent_aindices(void) /* create a file */ fid = H5Fcreate(FILE50, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /*------------------------------------------------------------------------- * root datasets @@ -6248,7 +6248,7 @@ gent_aindices(void) *------------------------------------------------------------------------- */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- @@ -6269,34 +6269,34 @@ gent_longlinks(void) /* Create files */ fid = H5Fcreate(FILE51, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create group with short name in file (used as target for hard links) */ gid = H5Gcreate2(fid, "grp1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid >= 0); + assert(gid >= 0); /* Construct very long file name */ objname = (char *)HDmalloc((size_t)(F51_MAX_NAME_LEN + 1)); - HDassert(objname); + assert(objname); for (u = 0; u < F51_MAX_NAME_LEN; u++) objname[u] = 'a'; objname[F51_MAX_NAME_LEN] = '\0'; /* Create hard link to existing object */ - HDassert(H5Lcreate_hard(fid, "grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); + assert(H5Lcreate_hard(fid, "grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); /* Create soft link to existing object */ objname[0] = 'b'; - HDassert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); + assert(H5Lcreate_soft("grp1", fid, objname, H5P_DEFAULT, H5P_DEFAULT) >= 0); /* Create group with long name in existing group */ gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid2 >= 0); + assert(gid2 >= 0); /* Close objects */ - HDassert(H5Gclose(gid2) >= 0); - HDassert(H5Gclose(gid) >= 0); - HDassert(H5Fclose(fid) >= 0); + assert(H5Gclose(gid2) >= 0); + assert(H5Gclose(gid) >= 0); + assert(H5Fclose(fid) >= 0); /* Release memory */ HDfree(objname); @@ -6494,7 +6494,7 @@ gent_bigdims(void) /* create a file */ fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* create dataset */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) @@ -6552,7 +6552,7 @@ gent_bigdims(void) did = H5I_INVALID_HID; ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); return; @@ -6592,12 +6592,12 @@ gent_hyperslab(void) /* create a file */ fid = H5Fcreate(FILE57, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); write_dset(fid, 2, dims, "stripmine", H5T_NATIVE_DOUBLE, buf); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); HDfree(buf); } @@ -7858,17 +7858,17 @@ gent_charsets(void) sid = H5Screate_simple(1, dim, NULL); fid = H5Fcreate(FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); status = H5Tset_cset(ascii_dtid, H5T_CSET_ASCII); - HDassert(status >= 0); + assert(status >= 0); H5Tinsert(charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_), ascii_dtid); status = H5Tset_cset(utf8_dtid, H5T_CSET_UTF8); - HDassert(status >= 0); + assert(status >= 0); H5Tinsert(charset_dtid, "utf8", HOFFSET(CharSetInfo, utf8_p_), utf8_dtid); did = H5Dcreate2(fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData); - HDassert(status >= 0); + assert(status >= 0); H5Tclose(charset_dtid); H5Tclose(ascii_dtid); @@ -7926,7 +7926,7 @@ gent_compound_intsizes(void) /* Allocate buffer */ Array1 = (Array1Struct *)HDmalloc(sizeof(Array1Struct) * F70_LENGTH); - HDassert(Array1); + assert(Array1); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F70_LENGTH; m++) { @@ -8038,126 +8038,126 @@ gent_compound_intsizes(void) /* Create the array data type for the 8 bits signed int array */ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(array8_tid >= 0); + assert(array8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16); - HDassert(array16_tid >= 0); + assert(array16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32); - HDassert(array32_tid >= 0); + assert(array32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64); - HDassert(array64_tid >= 0); + assert(array64_tid >= 0); /* Create the array data type for the 8 bits signed int array */ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(arrayu8_tid >= 0); + assert(arrayu8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16); - HDassert(arrayu16_tid >= 0); + assert(arrayu16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32); - HDassert(arrayu32_tid >= 0); + assert(arrayu32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64); - HDassert(arrayu64_tid >= 0); + assert(arrayu64_tid >= 0); /* Create the array data type for the 32 bits double array */ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8); - HDassert(arraydbl_tid >= 0); + assert(arraydbl_tid >= 0); /* Create the dataspace */ space = H5Screate_simple(F70_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE70, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); - HDassert(Array1Structid >= 0); + assert(Array1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F70_DATASETNAME, Array1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Array1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Array1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); HDfree(Array1); } @@ -8328,79 +8328,79 @@ gent_compound_attr_intsizes(void) /* Create the array data type for the 8 bits signed int array */ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(array8_tid >= 0); + assert(array8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F70_ARRAY_RANK, array_dim16); - HDassert(array16_tid >= 0); + assert(array16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F70_ARRAY_RANK, array_dim32); - HDassert(array32_tid >= 0); + assert(array32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F70_ARRAY_RANK, array_dim64); - HDassert(array64_tid >= 0); + assert(array64_tid >= 0); /* Create the array data type for the 8 bits signed int array */ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F70_ARRAY_RANK, array_dim8); - HDassert(arrayu8_tid >= 0); + assert(arrayu8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F70_ARRAY_RANK, array_dim16); - HDassert(arrayu16_tid >= 0); + assert(arrayu16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F70_ARRAY_RANK, array_dim32); - HDassert(arrayu32_tid >= 0); + assert(arrayu32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F70_ARRAY_RANK, array_dim64); - HDassert(arrayu64_tid >= 0); + assert(arrayu64_tid >= 0); /* Create the array data type for the 32 bits double array */ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F70_ARRAY_RANK, array_dim8); - HDassert(arraydbl_tid >= 0); + assert(arraydbl_tid >= 0); /* Create the dataspace */ space = H5Screate_simple(F70_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE71, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Array1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Array1Struct)); - HDassert(Array1Structid >= 0); + assert(Array1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Array1Structid, F70_DATASETU08, HOFFSET(Array1Struct, dsetu8), arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU16, HOFFSET(Array1Struct, dsetu16), arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU32, HOFFSET(Array1Struct, dsetu32), arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETU64, HOFFSET(Array1Struct, dsetu64), arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS08, HOFFSET(Array1Struct, dset8), array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS16, HOFFSET(Array1Struct, dset16), array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS32, HOFFSET(Array1Struct, dset32), array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DATASETS64, HOFFSET(Array1Struct, dset64), array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Array1Structid, F70_DUMMYDBL, HOFFSET(Array1Struct, dsetdbl), arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); root = H5Gopen2(fid, "/", H5P_DEFAULT); @@ -8409,47 +8409,47 @@ gent_compound_attr_intsizes(void) /* Write data to the attribute */ status = H5Awrite(attr, Array1Structid, Array1); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Array1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Aclose(attr); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); HDfree(Array1); } @@ -9230,7 +9230,7 @@ gent_compound_int_array(void) /* Allocate buffer */ Cmpd1 = (Cmpd1Struct *)HDmalloc(sizeof(Cmpd1Struct) * F76_LENGTH); - HDassert(Cmpd1); + assert(Cmpd1); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F76_LENGTH; m++) { @@ -9316,126 +9316,126 @@ gent_compound_int_array(void) /* Create the array data type for the 8 bits signed int array */ array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F76_ARRAY_RANK, array_dim8); - HDassert(array8_tid >= 0); + assert(array8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F76_ARRAY_RANK, array_dim16); - HDassert(array16_tid >= 0); + assert(array16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F76_ARRAY_RANK, array_dim32); - HDassert(array32_tid >= 0); + assert(array32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F76_ARRAY_RANK, array_dim64); - HDassert(array64_tid >= 0); + assert(array64_tid >= 0); /* Create the array data type for the 8 bits signed int array */ arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F76_ARRAY_RANK, array_dim8); - HDassert(arrayu8_tid >= 0); + assert(arrayu8_tid >= 0); /* Create the array data type for the 16 bits signed int array */ arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F76_ARRAY_RANK, array_dim16); - HDassert(arrayu16_tid >= 0); + assert(arrayu16_tid >= 0); /* Create the array data type for the 32 bits signed int array */ arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F76_ARRAY_RANK, array_dim32); - HDassert(arrayu32_tid >= 0); + assert(arrayu32_tid >= 0); /* Create the array data type for the 64 bits signed int array */ arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F76_ARRAY_RANK, array_dim64); - HDassert(arrayu64_tid >= 0); + assert(arrayu64_tid >= 0); /* Create the array data type for the 32 bits double array */ arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F76_ARRAY_RANK, array_dim8); - HDassert(arraydbl_tid >= 0); + assert(arraydbl_tid >= 0); /* Create the dataspace */ space = H5Screate_simple(F76_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE76, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); - HDassert(Cmpd1Structid >= 0); + assert(Cmpd1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F76_DATASETNAME, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Cmpd1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arrayu64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array8_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array16_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array32_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(array64_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Tclose(arraydbl_tid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); HDfree(Cmpd1); } @@ -9488,9 +9488,9 @@ gent_compound_ints(void) /* Allocate buffers */ Cmpd1 = (Cmpd1Struct *)HDmalloc(sizeof(Cmpd1Struct) * F77_LENGTH); - HDassert(Cmpd1); + assert(Cmpd1); Cmpd2 = (Cmpd2Struct *)HDmalloc(sizeof(Cmpd2Struct) * F77_LENGTH); - HDassert(Cmpd2); + assert(Cmpd2); /* Initialize the data in the arrays/datastructure */ for (m = 0; m < F77_LENGTH; m++) { @@ -9558,116 +9558,116 @@ gent_compound_ints(void) /* Create the dataspace */ space = H5Screate_simple(F76_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the file */ fid = H5Fcreate(FILE77, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* Create the memory data type */ Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); - HDassert(Cmpd1Structid >= 0); + assert(Cmpd1Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), H5T_NATIVE_UCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), H5T_NATIVE_USHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), H5T_NATIVE_UINT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), H5T_NATIVE_ULONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), H5T_NATIVE_SCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), H5T_NATIVE_SHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), H5T_NATIVE_INT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), H5T_NATIVE_LONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), H5T_NATIVE_DOUBLE); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F77_DATASETNAME1, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Cmpd1Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataspace */ space = H5Screate_simple(F76_RANK, dim, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create the memory data type */ Cmpd2Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd2Struct)); - HDassert(Cmpd2Structid >= 0); + assert(Cmpd2Structid >= 0); /* Insert the arrays and variables into the structure */ status = H5Tinsert(Cmpd2Structid, F76_DATASETU64, HOFFSET(Cmpd2Struct, dsetu64), H5T_NATIVE_ULONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETU32, HOFFSET(Cmpd2Struct, dsetu32), H5T_NATIVE_UINT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETU16, HOFFSET(Cmpd2Struct, dsetu16), H5T_NATIVE_USHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETU08, HOFFSET(Cmpd2Struct, dsetu8), H5T_NATIVE_UCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS64, HOFFSET(Cmpd2Struct, dset64), H5T_NATIVE_LONG); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS32, HOFFSET(Cmpd2Struct, dset32), H5T_NATIVE_INT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS16, HOFFSET(Cmpd2Struct, dset16), H5T_NATIVE_SHORT); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DATASETS08, HOFFSET(Cmpd2Struct, dset8), H5T_NATIVE_SCHAR); - HDassert(status >= 0); + assert(status >= 0); status = H5Tinsert(Cmpd2Structid, F76_DUMMYDBL, HOFFSET(Cmpd2Struct, dsetdbl), H5T_NATIVE_DOUBLE); - HDassert(status >= 0); + assert(status >= 0); /* Create the dataset */ dataset = H5Dcreate2(fid, F77_DATASETNAME2, Cmpd2Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Write data to the dataset */ status = H5Dwrite(dataset, Cmpd2Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd2); - HDassert(status >= 0); + assert(status >= 0); /* Release resources */ status = H5Tclose(Cmpd2Structid); - HDassert(status >= 0); + assert(status >= 0); status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); status = H5Dclose(dataset); - HDassert(status >= 0); + assert(status >= 0); status = H5Fclose(fid); - HDassert(status >= 0); + assert(status >= 0); HDfree(Cmpd1); HDfree(Cmpd2); @@ -10755,7 +10755,7 @@ gent_compound_complex2(void) /* Allocate buffer */ buf = (compound *)HDmalloc(sizeof(compound) * F82_DIM32); - HDassert(buf); + assert(buf); file = H5Fcreate(FILE82, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -11124,54 +11124,54 @@ gent_udfilter(void) /* create a file */ fid = H5Fcreate(FILE84, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid >= 0); + assert(fid >= 0); /* create a space */ sid = H5Screate_simple(SPACE2_RANK, dims1, NULL); dcpl = H5Pcreate(H5P_DATASET_CREATE); - HDassert(dcpl >= 0); + assert(dcpl >= 0); ret = H5Pset_layout(dcpl, H5D_CHUNKED); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Zregister(H5Z_DYNLIBUD); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pset_filter(dcpl, H5Z_FILTER_DYNLIBUD, H5Z_FLAG_MANDATORY, 0, NULL); - HDassert(ret >= 0); + assert(ret >= 0); /* create the dataset */ dsid = H5Dcreate2(fid, "dynlibud", H5T_STD_I32LE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT); - HDassert(dsid >= 0); + assert(dsid >= 0); /* write */ ret = H5Dwrite(dsid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1); - HDassert(ret >= 0); + assert(ret >= 0); /* close */ ret = H5Dclose(dsid); - HDassert(ret >= 0); + assert(ret >= 0); /* remove the filters from the dcpl */ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL); - HDassert(ret >= 0); + assert(ret >= 0); /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Pclose(dcpl); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); } /*------------------------------------------------------------------------- diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index cbb5f8f..35b6b07 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -222,7 +222,7 @@ main(void) */ TESTING(" files with file space info setting--no options (-S, -P, -T, -G) are set"); j = 0; /* #0 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -239,7 +239,7 @@ main(void) TESTING(" files with file space info setting--all options -S, -P, -T, -G are set"); ++j; /* #1 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -259,7 +259,7 @@ main(void) TESTING(" files with file space info setting--options -S and -T are set"); ++j; /* #2 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -278,7 +278,7 @@ main(void) if (h5_using_default_driver(NULL)) { TESTING(" files with file space info setting-- options -S and -P are set & -L"); ++j; /* #3 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -296,7 +296,7 @@ main(void) TESTING(" files with file space info setting-- options -P and -T are set & -L"); ++j; /* #4 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -314,7 +314,7 @@ main(void) TESTING(" files with file space info setting-- options -S and -G are set & -L"); ++j; /* #5 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -332,7 +332,7 @@ main(void) TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); ++j; /* #6 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, FALSE) < 0) GOERROR; @@ -352,7 +352,7 @@ main(void) TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); ++j; /* #7 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); fname = H5REPACK_FSPACE_FNAMES[j]; if (h5repack_init(&pack_options, 0, TRUE) < 0) GOERROR; @@ -2040,7 +2040,7 @@ make_testfiles(void) * default: strategy=FSM_AGGR, persist=FALSE, threshold=1 * default: inpage=4096 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2061,7 +2061,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2080,7 +2080,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2103,7 +2103,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2125,7 +2125,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2145,7 +2145,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -2168,7 +2168,7 @@ make_testfiles(void) return -1; if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + assert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) return -1; if (H5Fclose(fid) < 0) @@ -3787,7 +3787,7 @@ make_userblock(void) /* Write userblock data */ nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE); - HDassert(nwritten == USERBLOCK_SIZE); + assert(nwritten == USERBLOCK_SIZE); /* Close file */ HDclose(fd); @@ -3852,7 +3852,7 @@ verify_userblock(const char *filename) /* Read userblock data */ nread = HDread(fd, ub, (size_t)USERBLOCK_SIZE); - HDassert(nread == USERBLOCK_SIZE); + assert(nread == USERBLOCK_SIZE); /* Verify userblock data */ for (u = 0; u < USERBLOCK_SIZE; u++) @@ -3902,7 +3902,7 @@ make_userblock_file(void) /* write userblock data */ nwritten = HDwrite(fd, ub, (size_t)USERBLOCK_SIZE); - HDassert(nwritten == USERBLOCK_SIZE); + assert(nwritten == USERBLOCK_SIZE); /* close file */ HDclose(fd); diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index c61e6a9..b815939 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -100,10 +100,10 @@ synchronize(void) int H5_ATTR_NDEBUG_UNUSED status; status = HDsystem("sync"); - HDassert(status >= 0); + assert(status >= 0); status = HDsystem("df >/dev/null"); - HDassert(status >= 0); + assert(status >= 0); #endif } @@ -150,15 +150,15 @@ main(void) /* Open the files */ file = H5Fcreate(HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(file >= 0); + assert(file >= 0); fd = HDopen(RAW_FILE_NAME, O_RDWR | O_CREAT | O_TRUNC, 0666); - HDassert(fd >= 0); + assert(fd >= 0); /* Create the dataset */ file_space = H5Screate_simple(2, size, size); - HDassert(file_space >= 0); + assert(file_space >= 0); dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(dset >= 0); + assert(dset >= 0); the_data = (unsigned char *)HDmalloc((size_t)(size[0] * size[1])); /* initial fill for lazy malloc */ @@ -198,7 +198,7 @@ main(void) HDputc(PROGRESS, stderr); HDfflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -222,9 +222,9 @@ main(void) HDputc(PROGRESS, stderr); HDfflush(stderr); offset = HDlseek(fd, (off_t)0, SEEK_SET); - HDassert(0 == offset); + assert(0 == offset); n = HDwrite(fd, the_data, (size_t)(size[0] * size[1])); - HDassert(n >= 0 && (size_t)n == (size[0] * size[1])); + assert(n >= 0 && (size_t)n == (size[0] * size[1])); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -248,7 +248,7 @@ main(void) HDputc(PROGRESS, stderr); HDfflush(stderr); status = H5Dwrite(dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -272,9 +272,9 @@ main(void) HDputc(PROGRESS, stderr); HDfflush(stderr); offset = HDlseek(fd, (off_t)0, SEEK_SET); - HDassert(0 == offset); + assert(0 == offset); n = HDread(fd, the_data, (size_t)(size[0] * size[1])); - HDassert(n >= 0 && (size_t)n == (size[0] * size[1])); + assert(n >= 0 && (size_t)n == (size[0] * size[1])); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -298,7 +298,7 @@ main(void) HDputc(PROGRESS, stderr); HDfflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -312,11 +312,11 @@ main(void) t_start, t_stop, (size_t)(nread * size[0] * size[1])); /* Read hyperslab */ - HDassert(size[0] > 20 && size[1] > 20); + assert(size[0] > 20 && size[1] > 20); start[0] = start[1] = 10; count[0] = count[1] = size[0] - 20; status = H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL); - HDassert(status >= 0); + assert(status >= 0); synchronize(); #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_start); @@ -327,7 +327,7 @@ main(void) HDputc(PROGRESS, stderr); HDfflush(stderr); status = H5Dread(dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - HDassert(status >= 0); + assert(status >= 0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); |