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 /src/H5Dvirtual.c | |
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 'src/H5Dvirtual.c')
-rw-r--r-- | src/H5Dvirtual.c | 270 |
1 files changed, 135 insertions, 135 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index f850e1c..18596b9 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -320,9 +320,9 @@ H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx) FUNC_ENTER_NOAPI(FAIL) - HDassert(layout); - HDassert(layout->type == H5D_VIRTUAL); - HDassert(idx < virt->list_nalloc); + assert(layout); + assert(layout->type == H5D_VIRTUAL); + assert(idx < virt->list_nalloc); /* Get type of selection */ if (H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(ent->source_dset.virtual_select))) @@ -373,9 +373,9 @@ H5D_virtual_check_min_dims(const H5D_t *dset) FUNC_ENTER_NOAPI(FAIL) - HDassert(dset); - HDassert(dset->shared); - HDassert(dset->shared->layout.type == H5D_VIRTUAL); + assert(dset); + assert(dset->shared); + assert(dset->shared->layout.type == H5D_VIRTUAL); /* Get rank of dataspace */ if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) @@ -429,9 +429,9 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) FUNC_ENTER_PACKAGE /* Sanity checking */ - HDassert(f); - HDassert(layout); - HDassert(virt->serial_list_hobjid.addr == HADDR_UNDEF); + assert(f); + assert(layout); + assert(virt->serial_list_hobjid.addr == HADDR_UNDEF); /* Create block if # of used entries > 0 */ if (virt->list_nused > 0) { @@ -455,10 +455,10 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) H5O_storage_virtual_ent_t *ent = &virt->list[i]; hssize_t select_serial_size; /* Size of serialized selection */ - HDassert(ent->source_file_name); - HDassert(ent->source_dset_name); - HDassert(ent->source_select); - HDassert(ent->source_dset.virtual_select); + assert(ent->source_file_name); + assert(ent->source_dset_name); + assert(ent->source_select); + assert(ent->source_dset.virtual_select); /* Source file name */ str_size[2 * i] = HDstrlen(ent->source_file_name) + (size_t)1; @@ -562,8 +562,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) FUNC_ENTER_PACKAGE - HDassert(layout); - HDassert(layout->type == H5D_VIRTUAL); + assert(layout); + assert(layout->type == H5D_VIRTUAL); /* Save original entry list and top-level property lists and reset in layout * so the originals aren't closed on error */ @@ -576,7 +576,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Copy entry list */ if (virt->list_nused > 0) { - HDassert(orig_list); + assert(orig_list); /* Allocate memory for the list */ if (NULL == (virt->list = H5MM_calloc(virt->list_nused * sizeof(virt->list[0])))) @@ -630,8 +630,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) else if (orig_list[i].parsed_source_file_name && (orig_list[i].source_dset.file_name != orig_list[i].parsed_source_file_name->name_segment)) { - HDassert(ent->parsed_source_file_name); - HDassert(ent->parsed_source_file_name->name_segment); + assert(ent->parsed_source_file_name); + assert(ent->parsed_source_file_name->name_segment); ent->source_dset.file_name = ent->parsed_source_file_name->name_segment; } /* end if */ else if (NULL == @@ -644,8 +644,8 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) else if (orig_list[i].parsed_source_dset_name && (orig_list[i].source_dset.dset_name != orig_list[i].parsed_source_dset_name->name_segment)) { - HDassert(ent->parsed_source_dset_name); - HDassert(ent->parsed_source_dset_name->name_segment); + assert(ent->parsed_source_dset_name); + assert(ent->parsed_source_dset_name->name_segment); ent->source_dset.dset_name = ent->parsed_source_dset_name->name_segment; } /* end if */ else if (NULL == @@ -721,8 +721,8 @@ H5D__virtual_reset_layout(H5O_layout_t *layout) FUNC_ENTER_PACKAGE - HDassert(layout); - HDassert(layout->type == H5D_VIRTUAL); + assert(layout); + assert(layout->type == H5D_VIRTUAL); /* Free the list entries. Note we always attempt to free everything even in * the case of a failure. Because of this, and because we free the list @@ -846,9 +846,9 @@ H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage) FUNC_ENTER_PACKAGE /* check args */ - HDassert(f); - HDassert(storage); - HDassert(storage->type == H5D_VIRTUAL); + assert(f); + assert(storage); + assert(storage->type == H5D_VIRTUAL); /* Check for global heap block */ if (storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF) { @@ -894,11 +894,11 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(vdset); - HDassert(source_dset); - HDassert(!source_dset->dset); - HDassert(source_dset->file_name); - HDassert(source_dset->dset_name); + assert(vdset); + assert(source_dset); + assert(!source_dset->dset); + assert(source_dset->file_name); + assert(source_dset->dset_name); /* Check if we need to open the source file */ if (HDstrcmp(source_dset->file_name, ".") != 0) { @@ -986,7 +986,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(source_dset); + assert(source_dset); /* Free dataset */ if (source_dset->dset) { @@ -1000,20 +1000,20 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, (source_dset->file_name != virtual_ent->parsed_source_file_name->name_segment)) source_dset->file_name = (char *)H5MM_xfree(source_dset->file_name); else - HDassert((source_dset->file_name == virtual_ent->source_file_name) || - (virtual_ent->parsed_source_file_name && - (source_dset->file_name == virtual_ent->parsed_source_file_name->name_segment)) || - !source_dset->file_name); + assert((source_dset->file_name == virtual_ent->source_file_name) || + (virtual_ent->parsed_source_file_name && + (source_dset->file_name == virtual_ent->parsed_source_file_name->name_segment)) || + !source_dset->file_name); /* Free dataset name */ if (virtual_ent->parsed_source_dset_name && (source_dset->dset_name != virtual_ent->parsed_source_dset_name->name_segment)) source_dset->dset_name = (char *)H5MM_xfree(source_dset->dset_name); else - HDassert((source_dset->dset_name == virtual_ent->source_dset_name) || - (virtual_ent->parsed_source_dset_name && - (source_dset->dset_name == virtual_ent->parsed_source_dset_name->name_segment)) || - !source_dset->dset_name); + assert((source_dset->dset_name == virtual_ent->source_dset_name) || + (virtual_ent->parsed_source_dset_name && + (source_dset->dset_name == virtual_ent->parsed_source_dset_name->name_segment)) || + !source_dset->dset_name); /* Free clipped virtual selection */ if (source_dset->clipped_virtual_select) { @@ -1040,7 +1040,7 @@ H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent, /* The projected memory space should never exist when this function is * called */ - HDassert(!source_dset->projected_mem_space); + assert(!source_dset->projected_mem_space); /* Note the lack of a done: label. This is because there are no HGOTO_ERROR * calls. If one is added, a done: label must also be added */ @@ -1068,17 +1068,17 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(src); - HDassert(src_len > 0); - HDassert(p); - HDassert(buf); - HDassert(*p >= *buf); - HDassert(buf_size); + assert(src); + assert(src_len > 0); + assert(p); + assert(buf); + assert(*p >= *buf); + assert(buf_size); /* Allocate or extend buffer if necessary */ if (!*buf) { - HDassert(!*p); - HDassert(*buf_size == 0); + assert(!*p); + assert(*buf_size == 0); /* Allocate buffer */ if (NULL == (*buf = (char *)H5MM_malloc(src_len + (size_t)1))) @@ -1150,10 +1150,10 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ - HDassert(source_name); - HDassert(parsed_name); - HDassert(static_strlen); - HDassert(nsubs); + assert(source_name); + assert(parsed_name); + assert(static_strlen); + assert(nsubs); /* Initialize p and tmp_static_strlen */ p = source_name; @@ -1163,7 +1163,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ /* Note this will not work with UTF-8! We should support this eventually * -NAF 5/18/2015 */ while ((pct = HDstrchr(p, '%'))) { - HDassert(pct >= p); + assert(pct >= p); /* Allocate name segment struct if necessary */ if (!*tmp_parsed_name_p) @@ -1204,11 +1204,11 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ /* Copy last segment of name, if any, unless the parsed name was not * allocated */ if (tmp_parsed_name) { - HDassert(p >= source_name); + assert(p >= source_name); if (*p == '\0') - HDassert((size_t)(p - source_name) == tmp_strlen); + assert((size_t)(p - source_name) == tmp_strlen); else { - HDassert((size_t)(p - source_name) < tmp_strlen); + assert((size_t)(p - source_name) < tmp_strlen); /* Allocate name segment struct if necessary */ if (!*tmp_parsed_name_p) @@ -1230,7 +1230,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ done: if (tmp_parsed_name) { - HDassert(ret_value < 0); + assert(ret_value < 0); H5D_virtual_free_parsed_name(tmp_parsed_name); } /* end if */ @@ -1260,7 +1260,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_ FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dst); + assert(dst); /* Walk over parsed name, duplicating it */ while (p_src) { @@ -1285,7 +1285,7 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_ done: if (tmp_dst) { - HDassert(ret_value < 0); + assert(ret_value < 0); H5D_virtual_free_parsed_name(tmp_dst); } /* end if */ @@ -1345,8 +1345,8 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(source_name); - HDassert(built_name); + assert(source_name); + assert(built_name); /* Check for static name */ if (nsubs == 0) { @@ -1365,7 +1365,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name size_t seg_len; size_t nsubs_rem = nsubs; - HDassert(parsed_name); + assert(parsed_name); /* Calculate length of printed block number */ do { @@ -1388,8 +1388,8 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name /* Add name segment */ if (name_seg->name_segment) { seg_len = HDstrlen(name_seg->name_segment); - HDassert(seg_len > 0); - HDassert(seg_len < name_len_rem); + assert(seg_len > 0); + assert(seg_len < name_len_rem); HDstrncpy(p, name_seg->name_segment, name_len_rem); name_len_rem -= seg_len; p += seg_len; @@ -1397,7 +1397,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name /* Add block number */ if (nsubs_rem > 0) { - HDassert(blockno_len < name_len_rem); + assert(blockno_len < name_len_rem); if (HDsnprintf(p, name_len_rem, "%llu", (long long unsigned)blockno) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string") name_len_rem -= blockno_len; @@ -1416,7 +1416,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name done: if (tmp_name) { - HDassert(ret_value < 0); + assert(ret_value < 0); H5MM_free(tmp_name); } /* end if */ @@ -1453,10 +1453,10 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset); - HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); + assert(dset); + assert(dset->shared->layout.storage.type == H5D_VIRTUAL); storage = &dset->shared->layout.storage.u.virt; - HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Get rank of VDS */ if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) @@ -1518,8 +1518,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Close previous clipped virtual selection, if * any */ if (storage->list[i].source_dset.clipped_virtual_select) { - HDassert(storage->list[i].source_dset.clipped_virtual_select != - storage->list[i].source_dset.virtual_select); + assert(storage->list[i].source_dset.clipped_virtual_select != + storage->list[i].source_dset.virtual_select); if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") @@ -1541,8 +1541,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Close previous clipped source selection, if any */ if (storage->list[i].source_dset.clipped_source_select) { - HDassert(storage->list[i].source_dset.clipped_source_select != - storage->list[i].source_select); + assert(storage->list[i].source_dset.clipped_source_select != + storage->list[i].source_select); if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") @@ -1576,7 +1576,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) 0; /* First missing dataset in the current block of missing datasets */ /* Search for source datasets */ - HDassert(storage->printf_gap != HSIZE_UNDEF); + assert(storage->printf_gap != HSIZE_UNDEF); for (j = 0; j <= (storage->printf_gap + first_missing); j++) { /* Check for running out of space in sub_dset array */ if (j >= (hsize_t)storage->list[i].sub_dset_nalloc) { @@ -1766,8 +1766,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Non-printf mapping */ /* Close previous clipped virtual selection, if any */ if (storage->list[i].source_dset.clipped_virtual_select) { - HDassert(storage->list[i].source_dset.clipped_virtual_select != - storage->list[i].source_dset.virtual_select); + assert(storage->list[i].source_dset.clipped_virtual_select != + storage->list[i].source_dset.virtual_select); if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") @@ -1793,8 +1793,8 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) if (clip_size != storage->list[i].clip_size_source) { /* Close previous clipped source selection, if any */ if (storage->list[i].source_dset.clipped_source_select) { - HDassert(storage->list[i].source_dset.clipped_source_select != - storage->list[i].source_select); + assert(storage->list[i].source_dset.clipped_source_select != + storage->list[i].source_select); if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") @@ -1896,7 +1896,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") } /* end if */ else - HDassert(!storage->list[i].sub_dset[j].clipped_virtual_select); + assert(!storage->list[i].sub_dset[j].clipped_virtual_select); } /* end for */ } /* end if */ @@ -1935,10 +1935,10 @@ H5D__virtual_init_all(const H5D_t *dset) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset); - HDassert(dset->shared->layout.storage.type == H5D_VIRTUAL); + assert(dset); + assert(dset->shared->layout.storage.type == H5D_VIRTUAL); storage = &dset->shared->layout.storage.u.virt; - HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Get current VDS dimensions */ if (H5S_get_simple_extent_dims(dset->shared->space, virtual_dims, NULL) < 0) @@ -1977,8 +1977,8 @@ H5D__virtual_init_all(const H5D_t *dset) /* Close previous clipped virtual selection, if any */ if (storage->list[i].source_dset.clipped_virtual_select) { - HDassert(storage->list[i].source_dset.clipped_virtual_select != - storage->list[i].source_dset.virtual_select); + assert(storage->list[i].source_dset.clipped_virtual_select != + storage->list[i].source_dset.virtual_select); if (H5S_close(storage->list[i].source_dset.clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped virtual dataspace") @@ -1991,8 +1991,8 @@ H5D__virtual_init_all(const H5D_t *dset) /* Close previous clipped source selection, if any */ if (storage->list[i].source_dset.clipped_source_select) { - HDassert(storage->list[i].source_dset.clipped_source_select != - storage->list[i].source_select); + assert(storage->list[i].source_dset.clipped_source_select != + storage->list[i].source_select); if (H5S_close(storage->list[i].source_dset.clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release clipped source dataspace") @@ -2036,8 +2036,8 @@ H5D__virtual_init_all(const H5D_t *dset) } /* end else */ } /* end if */ else { - HDassert(!storage->list[i].source_dset.clipped_virtual_select); - HDassert(!storage->list[i].source_dset.clipped_source_select); + assert(!storage->list[i].source_dset.clipped_virtual_select); + assert(!storage->list[i].source_dset.clipped_source_select); } /* end else */ } /* end if */ else { @@ -2153,8 +2153,8 @@ H5D__virtual_init_all(const H5D_t *dset) else { /* Limited mapping, just make sure the clipped selections were * already set. Again, no need to open the source file. */ - HDassert(storage->list[i].source_dset.clipped_virtual_select); - HDassert(storage->list[i].source_dset.clipped_source_select); + assert(storage->list[i].source_dset.clipped_virtual_select); + assert(storage->list[i].source_dset.clipped_source_select); } /* end else */ /* Mark layout as fully initialized */ @@ -2189,9 +2189,9 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset); + assert(dset); storage = &dset->shared->layout.storage.u.virt; - HDassert(storage->list || (storage->list_nused == 0)); + assert(storage->list || (storage->list_nused == 0)); /* Check that the dimensions of the VDS are large enough */ if (H5D_virtual_check_min_dims(dset) < 0) @@ -2208,7 +2208,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) * source_space_status and virtual_space_status because others will be based * on these and should therefore already have been normalized. */ for (i = 0; i < storage->list_nused; i++) { - HDassert(storage->list[i].sub_dset_nalloc == 0); + assert(storage->list[i].sub_dset_nalloc == 0); /* Patch extent */ if (H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0) @@ -2270,7 +2270,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) if (H5P_get(source_fapl, H5F_ACS_CLOSE_DEGREE_NAME, &close_degree) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree") - HDassert(close_degree == H5F_CLOSE_WEAK); + assert(close_degree == H5F_CLOSE_WEAK); } /* end else */ #endif /* NDEBUG */ @@ -2340,7 +2340,7 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset) FUNC_ENTER_PACKAGE_NOERR /* Sanity checks */ - HDassert(shared_dset); + assert(shared_dset); storage = &shared_dset->layout.storage.u.virt; /* Iterate over mappings */ @@ -2421,10 +2421,10 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(storage); - HDassert(mem_space); - HDassert(file_space); - HDassert(tot_nelmts); + assert(storage); + assert(mem_space); + assert(file_space); + assert(tot_nelmts); /* Initialize layout if necessary */ if (!storage->init) @@ -2437,13 +2437,13 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) { /* Sanity check that the virtual space has been patched by now */ - HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); + assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Check for "printf" source dataset resolution */ if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { hbool_t partial_block; - HDassert(storage->list[i].unlim_dim_virtual >= 0); + assert(storage->list[i].unlim_dim_virtual >= 0); /* Get selection bounds if necessary */ if (!bounds_init) { @@ -2484,12 +2484,12 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag if (!storage->list[i].sub_dset[j].clipped_virtual_select) { hsize_t start[H5S_MAX_RANK]; /* This should only be NULL if this is a partial block */ - HDassert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block); + assert((j == (storage->list[i].sub_dset_io_end - 1)) && partial_block); /* If the source space status is not correct, we must try to * open the source dataset to patch it */ if (storage->list[i].source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { - HDassert(!storage->list[i].sub_dset[j].dset); + assert(!storage->list[i].sub_dset[j].dset); if (H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].sub_dset[j]) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") @@ -2509,7 +2509,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag vbounds_end) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") - HDassert(bounds_init); + assert(bounds_init); /* Convert bounds to extent (add 1) */ for (k = 0; k < (size_t)rank; k++) @@ -2646,8 +2646,8 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag * H5Dget_space(). Do not attempt to open it as this might * affect the extent and we are not going to recalculate it * here. */ - HDassert(storage->list[i].unlim_dim_virtual >= 0); - HDassert(!storage->list[i].source_dset.dset); + assert(storage->list[i].unlim_dim_virtual >= 0); + assert(!storage->list[i].source_dset.dset); } /* end else */ } /* end else */ } /* end for */ @@ -2677,7 +2677,7 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(storage); + assert(storage); /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) @@ -2726,14 +2726,14 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset FUNC_ENTER_PACKAGE - HDassert(source_dset); + assert(source_dset); /* Only perform I/O if there is a projected memory space, otherwise there * were no elements in the projection or the source dataset could not be * opened */ if (source_dset->projected_mem_space) { - HDassert(source_dset->dset); - HDassert(source_dset->clipped_source_select); + assert(source_dset->dset); + assert(source_dset->clipped_source_select); /* Project intersection of file space and mapping virtual space onto * mapping source space */ @@ -2765,7 +2765,7 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset done: /* Release allocated resources */ if (projected_src_space) { - HDassert(ret_value < 0); + assert(ret_value < 0); if (H5S_close(projected_src_space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") } /* end if */ @@ -2798,14 +2798,14 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(io_info); - HDassert(dset_info); - HDassert(dset_info->buf.vp); - HDassert(dset_info->mem_space); - HDassert(dset_info->file_space); + assert(io_info); + assert(dset_info); + assert(dset_info->buf.vp); + assert(dset_info->mem_space); + assert(dset_info->file_space); storage = &(dset_info->dset->shared->layout.storage.u.virt); - HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Initialize nelmts */ nelmts = H5S_GET_SELECT_NPOINTS(dset_info->file_space); @@ -2823,7 +2823,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) { /* Sanity check that the virtual space has been patched by now */ - HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); + assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Check for "printf" source dataset resolution */ if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { @@ -2887,7 +2887,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info /* Verify number of elements is correct. Note that since we * don't check for overlap we can't assert that these are equal */ - HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); + assert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); } /* end block */ #endif /* NDEBUG */ } /* end if */ @@ -2927,13 +2927,13 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse FUNC_ENTER_PACKAGE - HDassert(source_dset); + assert(source_dset); /* Only perform I/O if there is a projected memory space, otherwise there * were no elements in the projection */ if (source_dset->projected_mem_space) { - HDassert(source_dset->dset); - HDassert(source_dset->clipped_source_select); + assert(source_dset->dset); + assert(source_dset->clipped_source_select); /* In the future we may wish to extent this implementation to extend * source datasets if a write to a virtual dataset goes past the current @@ -2968,7 +2968,7 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse done: /* Release allocated resources */ if (projected_src_space) { - HDassert(ret_value < 0); + assert(ret_value < 0); if (H5S_close(projected_src_space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") } /* end if */ @@ -3000,14 +3000,14 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(io_info); - HDassert(dset_info); - HDassert(dset_info->buf.cvp); - HDassert(dset_info->mem_space); - HDassert(dset_info->file_space); + assert(io_info); + assert(dset_info); + assert(dset_info->buf.cvp); + assert(dset_info->mem_space); + assert(dset_info->file_space); storage = &(dset_info->dset->shared->layout.storage.u.virt); - HDassert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); + assert((storage->view == H5D_VDS_FIRST_MISSING) || (storage->view == H5D_VDS_LAST_AVAILABLE)); /* Initialize nelmts */ nelmts = H5S_GET_SELECT_NPOINTS(dset_info->file_space); @@ -3031,7 +3031,7 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) { /* Sanity check that virtual space has been patched by now */ - HDassert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); + assert(storage->list[i].virtual_space_status == H5O_VIRTUAL_STATUS_CORRECT); /* Check for "printf" source dataset resolution */ if (storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) { @@ -3076,7 +3076,7 @@ H5D__virtual_flush(H5D_t *dset) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset); + assert(dset); storage = &dset->shared->layout.storage.u.virt; @@ -3123,8 +3123,8 @@ H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t * FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset); - HDassert(head && NULL == *head); + assert(dset); + assert(head && NULL == *head); /* Set the convenience pointer */ storage = &dset->shared->layout.storage.u.virt; @@ -3196,7 +3196,7 @@ H5D__virtual_refresh_source_dset(H5D_t **dset) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset && *dset); + assert(dset && *dset); /* Get a temporary identifier for this source dataset */ if ((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, FALSE)) < 0) @@ -3242,7 +3242,7 @@ H5D__virtual_refresh_source_dsets(H5D_t *dset) FUNC_ENTER_PACKAGE /* Sanity check */ - HDassert(dset); + assert(dset); /* Set convenience pointer */ storage = &dset->shared->layout.storage.u.virt; |