summaryrefslogtreecommitdiffstats
path: root/src/H5HFcache.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-28 14:31:56 (GMT)
committerGitHub <noreply@github.com>2023-06-28 14:31:56 (GMT)
commit7a44581a84778a1346a2fd5b6cca7d9db905a321 (patch)
tree44ea9c2d1b471eb227698abe8499c34cfa6d47d2 /src/H5HFcache.c
parent622fcbd13881fbc58bbeaed3062583b759f5e864 (diff)
downloadhdf5-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/H5HFcache.c')
-rw-r--r--src/H5HFcache.c462
1 files changed, 231 insertions, 231 deletions
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 704d55a..25cbf82 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -202,8 +202,8 @@ H5HF__hdr_prefix_decode(H5HF_hdr_t *hdr, const uint8_t **image_ref)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(image);
+ assert(hdr);
+ assert(image);
/* Magic number */
if (HDmemcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
@@ -245,9 +245,9 @@ H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(pp && *pp);
- HDassert(dtable);
+ assert(f);
+ assert(pp && *pp);
+ assert(dtable);
/* Table width */
UINT16DECODE(*pp, dtable->cparam.width);
@@ -293,9 +293,9 @@ H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(f);
- HDassert(pp && *pp);
- HDassert(dtable);
+ assert(f);
+ assert(pp && *pp);
+ assert(dtable);
/* Table width */
UINT16ENCODE(*pp, dtable->cparam.width);
@@ -349,8 +349,8 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Set the internal parameters for the heap */
dummy_hdr.f = udata->f;
@@ -389,10 +389,10 @@ H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(actual_len);
- HDassert(*actual_len == image_len);
+ assert(image);
+ assert(udata);
+ assert(actual_len);
+ assert(*actual_len == image_len);
/* Deserialize the fractal heap header's prefix */
if (H5HF__hdr_prefix_decode(&hdr, &image) < 0)
@@ -433,7 +433,7 @@ H5HF__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -473,10 +473,10 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(len > 0);
- HDassert(udata);
- HDassert(dirty);
+ assert(image);
+ assert(len > 0);
+ assert(udata);
+ assert(dirty);
/* Allocate space for the fractal heap data structure */
if (NULL == (hdr = H5HF__hdr_alloc(udata->f)))
@@ -522,14 +522,14 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
/* Sanity check */
/* (allow for checksum not decoded yet) */
- HDassert((size_t)(image - (const uint8_t *)_image) == (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
+ assert((size_t)(image - (const uint8_t *)_image) == (hdr->heap_size - H5HF_SIZEOF_CHKSUM));
/* Check for I/O filter information to decode */
if (hdr->filter_len > 0) {
H5O_pline_t *pline; /* Pipeline information from the header on disk */
/* Sanity check */
- HDassert(len > hdr->heap_size); /* A header with filter info is > than a standard header */
+ assert(len > hdr->heap_size); /* A header with filter info is > than a standard header */
/* Compute the heap header's size */
hdr->heap_size += (size_t)(hdr->sizeof_size /* Size of size for filtered root direct block */
@@ -561,7 +561,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
+ assert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
/* Finish initialization of heap header */
if (H5HF__hdr_finish_init(hdr) < 0)
@@ -603,9 +603,9 @@ H5HF__cache_hdr_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(image_len);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(image_len);
*image_len = hdr->heap_size;
@@ -643,14 +643,14 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(H5_addr_defined(addr));
- HDassert(addr == hdr->heap_addr);
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(H5_addr_defined(addr));
+ assert(addr == hdr->heap_addr);
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
#ifndef NDEBUG
{
@@ -686,7 +686,7 @@ H5HF__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t len,
if (H5HF__cache_verify_hdr_descendants_clean((H5F_t *)f, hdr, &fd_children_clean,
&descendants_clean) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean.")
- HDassert(fd_children_clean);
+ assert(fd_children_clean);
}
#endif /* NDEBUG */
@@ -729,11 +729,11 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(len == hdr->heap_size);
+ assert(f);
+ assert(image);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(len == hdr->heap_size);
/* Set the shared heap header's file context for this operation */
H5_GCC_DIAG_OFF("discarded-qualifiers")
@@ -805,7 +805,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
UINT32ENCODE(image, metadata_chksum);
/* sanity check */
- HDassert((size_t)(image - (uint8_t *)_image) == len);
+ assert((size_t)(image - (uint8_t *)_image) == len);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -840,9 +840,9 @@ H5HF__cache_hdr_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(hdr->rc == 0);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr->rc == 0);
if (H5HF__hdr_free(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header")
@@ -873,10 +873,10 @@ H5HF__cache_iblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(udata->par_info);
- HDassert(udata->par_info->hdr);
- HDassert(image_len);
+ assert(udata);
+ assert(udata->par_info);
+ assert(udata->par_info->hdr);
+ assert(image_len);
/* Set the image length size */
*image_len = (size_t)H5HF_MAN_INDIRECT_SIZE(udata->par_info->hdr, *udata->nrows);
@@ -908,7 +908,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
FUNC_ENTER_PACKAGE_NOERR
/* Check arguments */
- HDassert(image);
+ assert(image);
/* Get stored and computed checksums */
H5F_get_checksums(image, len, &stored_chksum, &computed_chksum);
@@ -955,11 +955,11 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
- HDassert(dirty);
+ assert(image);
+ assert(udata);
+ assert(dirty);
hdr = udata->par_info->hdr;
- HDassert(hdr->f);
+ assert(hdr->f);
/* Set the shared heap header's file context for this operation */
hdr->f = udata->f;
@@ -982,7 +982,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock->nrows);
/* sanity check */
- HDassert(iblock->size == len);
+ assert(iblock->size == len);
/* Magic number */
if (HDmemcmp(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0)
@@ -1026,7 +1026,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT64DECODE_VAR(image, iblock->block_off, hdr->heap_off_size);
/* Allocate & decode child block entry tables */
- HDassert(iblock->nrows > 0);
+ assert(iblock->nrows > 0);
if (NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t,
(size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
@@ -1052,7 +1052,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Check for heap with I/O filters */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Decode extra information for direct blocks */
if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
@@ -1063,8 +1063,8 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
- (!H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ assert((H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* I/O filter mask for filtered direct block */
UINT32DECODE(image, iblock->filt_ents[u].filter_mask);
@@ -1079,7 +1079,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
} /* end for */
/* Sanity check */
- HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
+ assert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
/* checksum verification already done by verify_chksum cb */
@@ -1087,7 +1087,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
UINT32DECODE(image, stored_chksum);
/* Sanity check */
- HDassert((size_t)(image - (const uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (const uint8_t *)_image) == iblock->size);
/* Check if we have any indirect block children */
if (iblock->nrows > hdr->man_dtable.max_direct_rows) {
@@ -1136,9 +1136,9 @@ H5HF__cache_iblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(image_len);
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(image_len);
*image_len = iblock->size;
@@ -1176,18 +1176,18 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->cache_info.size == iblock->size);
- HDassert(H5_addr_defined(addr));
- HDassert(H5_addr_eq(iblock->addr, addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->cache_info.size == iblock->size);
+ assert(H5_addr_defined(addr));
+ assert(H5_addr_eq(iblock->addr, addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
hdr = iblock->hdr;
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
#ifndef NDEBUG
{
@@ -1210,7 +1210,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
if (H5HF__cache_verify_iblock_descendants_clean((H5F_t *)f, iblock->addr, iblock, &iblock_status,
&fd_children_clean, &descendants_clean) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean.")
- HDassert(fd_children_clean);
+ assert(fd_children_clean);
}
#endif /* NDEBUG */
@@ -1226,7 +1226,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block")
/* Sanity check */
- HDassert(!H5_addr_eq(iblock->addr, iblock_addr));
+ assert(!H5_addr_eq(iblock->addr, iblock_addr));
/* Let the metadata cache know the block moved */
if (H5AC_move_entry((H5F_t *)f, H5AC_FHEAP_IBLOCK, iblock->addr, iblock_addr) < 0)
@@ -1302,16 +1302,16 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->cache_info.size == iblock->size);
- HDassert(len == iblock->size);
+ assert(f);
+ assert(image);
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->cache_info.size == iblock->size);
+ assert(len == iblock->size);
/* Indirect block must be in 'normal' file space */
- HDassert(!H5F_IS_TMP_ADDR(f, iblock->addr));
- HDassert(H5_addr_eq(iblock->addr, iblock->cache_info.addr));
+ assert(!H5F_IS_TMP_ADDR(f, iblock->addr));
+ assert(H5_addr_eq(iblock->addr, iblock->cache_info.addr));
/* Get the pointer to the shared heap header */
hdr = iblock->hdr;
@@ -1344,7 +1344,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
/* Check for heap with I/O filters */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(iblock->filt_ents);
+ assert(iblock->filt_ents);
/* Encode extra information for direct blocks */
if (u < (hdr->man_dtable.max_direct_rows * hdr->man_dtable.cparam.width)) {
@@ -1352,8 +1352,8 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
/* (either both the address & size are defined or both are
* not defined)
*/
- HDassert((H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
- (!H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
+ assert((H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size) ||
+ (!H5_addr_defined(iblock->ents[u].addr) && iblock->filt_ents[u].size == 0));
/* Size of filtered direct block */
H5F_ENCODE_LENGTH(f, image, iblock->filt_ents[u].size);
@@ -1380,10 +1380,10 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG
UINT32ENCODE(image, metadata_chksum);
/* Sanity checks */
- HDassert((size_t)(image - (uint8_t *)_image) == iblock->size);
+ assert((size_t)(image - (uint8_t *)_image) == iblock->size);
#ifndef NDEBUG
- HDassert(nchildren == iblock->nchildren);
- HDassert(max_child == iblock->max_child);
+ assert(nchildren == iblock->nchildren);
+ assert(max_child == iblock->max_child);
#endif /* NDEBUG */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1416,9 +1416,9 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->hdr);
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->hdr);
/* further sanity checks */
if (iblock->parent == NULL) {
@@ -1426,7 +1426,7 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
/* the fractal heap has already pinned the hdr. Do what */
/* sanity checking we can. */
if ((iblock->block_off == 0) && (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED))
- HDassert(iblock->hdr->root_iblock == iblock);
+ assert(iblock->hdr->root_iblock == iblock);
} /* end if */
else {
/* if this is a child iblock, verify that the pointers are */
@@ -1435,9 +1435,9 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
- HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >=
- (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
+ assert(par_iblock->child_iblocks);
+ assert(iblock->par_entry >=
+ (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
indir_idx = iblock->par_entry -
@@ -1446,8 +1446,8 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
/* The pointer to iblock in the parent may not be set yet -- */
/* verify that it is either NULL, or that it has been set to */
/* iblock. */
- HDassert((NULL == par_iblock->child_iblocks[indir_idx]) ||
- (par_iblock->child_iblocks[indir_idx] == iblock));
+ assert((NULL == par_iblock->child_iblocks[indir_idx]) ||
+ (par_iblock->child_iblocks[indir_idx] == iblock));
} /* end else */
switch (action) {
@@ -1510,10 +1510,10 @@ H5HF__cache_iblock_free_icr(void *thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock->rc == 0);
- HDassert(iblock->hdr);
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock->rc == 0);
+ assert(iblock->hdr);
/* Destroy fractal heap indirect block */
if (H5HF__man_iblock_dest(iblock) < 0)
@@ -1547,14 +1547,14 @@ H5HF__cache_dblock_get_initial_load_size(void *_udata, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(udata);
- HDassert(image_len);
+ assert(udata);
+ assert(image_len);
/* Convenience variables */
par_info = (const H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -1602,12 +1602,12 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
par_info = (H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Get out if data block is not checksummed */
if (!(hdr->checksum_dblocks))
@@ -1677,8 +1677,8 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
/* Save the decompressed data to be used later in deserialize callback */
if (hdr->filter_len > 0) {
/* Sanity check */
- HDassert(udata->decompressed);
- HDassert(len == udata->dblock_size);
+ assert(udata->decompressed);
+ assert(len == udata->dblock_size);
/* Allocate block buffer */
if (NULL == (udata->dblk = H5FL_BLK_MALLOC(direct_block, (size_t)len)))
@@ -1731,14 +1731,14 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(image);
- HDassert(udata);
+ assert(image);
+ assert(udata);
par_info = (H5HF_parent_t *)(&(udata->par_info));
- HDassert(par_info);
+ assert(par_info);
hdr = par_info->hdr;
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(dirty);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(dirty);
/* Allocate space for the fractal heap direct block */
if (NULL == (dblock = H5FL_CALLOC(H5HF_direct_t)))
@@ -1761,7 +1761,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
/* Direct block is already decompressed in verify_chksum callback */
if (udata->decompressed) {
/* Sanity check */
- HDassert(udata->dblk);
+ assert(udata->dblk);
/* Take ownership of the decompressed direct block */
dblock->blk = udata->dblk;
@@ -1773,7 +1773,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
unsigned filter_mask; /* Excluded filters for direct block */
/* Sanity check */
- HDassert(udata->dblk == NULL);
+ assert(udata->dblk == NULL);
/* Initialize the filter callback struct */
filter_cb.op_data = NULL;
@@ -1797,7 +1797,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, NULL, "output pipeline failed")
/* Sanity check */
- HDassert(nbytes == dblock->size);
+ assert(nbytes == dblock->size);
/* Copy un-filtered data into block's buffer */
H5MM_memcpy(dblock->blk, read_buf, dblock->size);
@@ -1805,8 +1805,8 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
} /* end if */
else {
/* Sanity checks */
- HDassert(udata->dblk == NULL);
- HDassert(!udata->decompressed);
+ assert(udata->dblk == NULL);
+ assert(!udata->decompressed);
/* Allocate block buffer */
/* XXX: Change to using free-list factories */
@@ -1814,7 +1814,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy image to dblock->blk */
- HDassert(dblock->size == len);
+ assert(dblock->size == len);
H5MM_memcpy(dblock->blk, image, dblock->size);
} /* end else */
@@ -1863,7 +1863,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo
} /* end if */
/* Sanity check */
- HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
+ assert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* Set return value */
ret_value = (void *)dblock;
@@ -1906,13 +1906,13 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(image_len);
+ assert(dblock);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(image_len);
/* Set up convenience variables */
hdr = dblock->hdr;
- HDassert(hdr);
+ assert(hdr);
/* Check for I/O filters on this heap */
if (hdr->filter_len > 0) {
@@ -1959,7 +1959,7 @@ H5HF__cache_dblock_image_len(const void *_thing, size_t *image_len)
size = dblock->size;
/* Set the image size */
- HDassert(size > 0);
+ assert(size > 0);
*image_len = size;
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -2047,16 +2047,16 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(dblock);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->write_buf == NULL);
- HDassert(dblock->write_size == 0);
- HDassert(dblock->cache_info.size == len);
- HDassert(H5_addr_defined(addr));
- HDassert(new_addr);
- HDassert(new_len);
- HDassert(flags);
+ assert(f);
+ assert(dblock);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->write_buf == NULL);
+ assert(dblock->write_size == 0);
+ assert(dblock->cache_info.size == len);
+ assert(H5_addr_defined(addr));
+ assert(new_addr);
+ assert(new_len);
+ assert(flags);
/* Set up local variables */
hdr = dblock->hdr;
@@ -2065,8 +2065,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Set the shared heap header's file context for this operation */
hdr->f = (H5F_t *)f;
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
if (dblock->parent) {
/* this is the common case, in which the direct block is the child
@@ -2078,8 +2078,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
par_iblock = dblock->parent;
par_entry = dblock->par_entry;
- HDassert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(H5_addr_eq(par_iblock->ents[par_entry].addr, addr));
+ assert(par_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(H5_addr_eq(par_iblock->ents[par_entry].addr, addr));
} /* end if */
else {
/* the direct block is a root direct block -- just set par_iblock
@@ -2096,7 +2096,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* and the checksum at the beginning of the block.
*/
- HDassert(dblock->blk);
+ assert(dblock->blk);
image = dblock->blk;
/* Magic number */
@@ -2132,7 +2132,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
*/
/* Sanity check */
- HDassert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
+ assert((size_t)(image - dblock->blk) == (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr));
/* If I/O filters are enabled on this heap, we must run the direct block
* image through the filters to obtain the image that we will hand off
@@ -2179,8 +2179,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hbool_t hdr_changed = FALSE; /* Whether the header info changed */
/* Sanity check */
- HDassert(H5_addr_eq(hdr->man_dtable.table_addr, addr));
- HDassert(hdr->pline_root_direct_size > 0);
+ assert(H5_addr_eq(hdr->man_dtable.table_addr, addr));
+ assert(hdr->pline_root_direct_size > 0);
/* Check if the filter mask changed */
if (hdr->pline_root_direct_filter_mask != filter_mask) {
@@ -2192,7 +2192,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* size matches the heap's last record. This value will
* likely change shortly.
*/
- HDassert(len == hdr->pline_root_direct_size);
+ assert(len == hdr->pline_root_direct_size);
/* Check if we need to re-size the block on disk */
if (hdr->pline_root_direct_size != write_size || at_tmp_addr) {
@@ -2215,8 +2215,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Update information about compressed direct block's
* location & size
*/
- HDassert(hdr->man_dtable.table_addr == addr);
- HDassert(hdr->pline_root_direct_size == len);
+ assert(hdr->man_dtable.table_addr == addr);
+ assert(hdr->pline_root_direct_size == len);
hdr->man_dtable.table_addr = dblock_addr;
hdr->pline_root_direct_size = write_size;
@@ -2233,8 +2233,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
hbool_t par_changed = FALSE; /* Whether the parent's infochanged */
/* Sanity check */
- HDassert(par_iblock);
- HDassert(par_iblock->filt_ents[par_entry].size > 0);
+ assert(par_iblock);
+ assert(par_iblock->filt_ents[par_entry].size > 0);
/* Check if the filter mask changed */
if (par_iblock->filt_ents[par_entry].filter_mask != filter_mask) {
@@ -2246,7 +2246,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
* size matches the heap's last record. This value will
* likely change shortly.
*/
- HDassert(len == par_iblock->filt_ents[par_entry].size);
+ assert(len == par_iblock->filt_ents[par_entry].size);
/* Check if we need to re-size the block on disk */
if (par_iblock->filt_ents[par_entry].size != write_size || at_tmp_addr) {
@@ -2270,8 +2270,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Update information about compressed direct block's
* location & size
*/
- HDassert(par_iblock->ents[par_entry].addr == addr);
- HDassert(par_iblock->filt_ents[par_entry].size == len);
+ assert(par_iblock->ents[par_entry].addr == addr);
+ assert(par_iblock->filt_ents[par_entry].size == len);
par_iblock->ents[par_entry].addr = dblock_addr;
par_iblock->filt_ents[par_entry].size = write_size;
@@ -2312,8 +2312,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
/* Check for root direct block */
if (NULL == dblock->parent) {
/* Sanity checks */
- HDassert(H5_addr_eq(hdr->man_dtable.table_addr, addr));
- HDassert(!H5_addr_eq(hdr->man_dtable.table_addr, dblock_addr));
+ assert(H5_addr_eq(hdr->man_dtable.table_addr, addr));
+ assert(!H5_addr_eq(hdr->man_dtable.table_addr, dblock_addr));
/* Update information about direct block's location */
hdr->man_dtable.table_addr = dblock_addr;
@@ -2324,10 +2324,10 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
} /* end if */
else { /* the direct block's parent is an indirect block */
/* Sanity checks */
- HDassert(par_iblock);
- HDassert(par_iblock->ents);
- HDassert(H5_addr_eq(par_iblock->ents[par_entry].addr, addr));
- HDassert(!H5_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
+ assert(par_iblock);
+ assert(par_iblock->ents);
+ assert(H5_addr_eq(par_iblock->ents[par_entry].addr, addr));
+ assert(!H5_addr_eq(par_iblock->ents[par_entry].addr, dblock_addr));
/* Update information about direct block's location */
par_iblock->ents[par_entry].addr = dblock_addr;
@@ -2366,8 +2366,8 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le
*flags = dblock_flags;
/* final sanity check */
- HDassert(dblock->write_buf);
- HDassert(dblock->write_size > 0);
+ assert(dblock->write_buf);
+ assert(dblock->write_size > 0);
done:
/* discard the write buf if we have an error */
@@ -2408,16 +2408,16 @@ H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(f);
- HDassert(image);
- HDassert(len > 0);
- HDassert(dblock);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size));
- HDassert(dblock->write_buf);
- HDassert(dblock->write_size > 0);
- HDassert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size));
- HDassert(dblock->write_size == len);
+ assert(f);
+ assert(image);
+ assert(len > 0);
+ assert(dblock);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert((dblock->blk != dblock->write_buf) || (dblock->cache_info.size == dblock->size));
+ assert(dblock->write_buf);
+ assert(dblock->write_size > 0);
+ assert((dblock->blk != dblock->write_buf) || (dblock->write_size == dblock->size));
+ assert(dblock->write_size == len);
/* Copy the image from *(dblock->write_buf) to *image */
H5MM_memcpy(image, dblock->write_buf, dblock->write_size);
@@ -2458,9 +2458,9 @@ H5HF__cache_dblock_notify(H5AC_notify_action_t action, void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->hdr);
+ assert(dblock);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->hdr);
switch (action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
@@ -2522,8 +2522,8 @@ H5HF__cache_dblock_free_icr(void *_thing)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
/* Destroy fractal heap direct block */
if (H5HF__man_dblock_dest(dblock) < 0)
@@ -2556,10 +2556,10 @@ H5HF__cache_dblock_fsf_size(const void *_thing, hsize_t *fsf_size)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dblock);
- HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
- HDassert(dblock->file_size > 0);
- HDassert(fsf_size);
+ assert(dblock);
+ assert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
+ assert(dblock->file_size > 0);
+ assert(fsf_size);
/* Set free space in file size */
*fsf_size = dblock->file_size;
@@ -2642,17 +2642,17 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(hdr);
- HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
- HDassert(fd_clean);
- HDassert(clean);
+ assert(f);
+ assert(hdr);
+ assert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ assert(fd_clean);
+ assert(clean);
hdr_addr = hdr->cache_info.addr;
- HDassert(hdr_addr == hdr->heap_addr);
+ assert(hdr_addr == hdr->heap_addr);
if (H5AC_get_entry_status(f, hdr_addr, &hdr_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get hdr status")
- HDassert(hdr_status & H5AC_ES__IN_CACHE);
+ assert(hdr_status & H5AC_ES__IN_CACHE);
/* We have three basic scenarios we have to deal with:
*
@@ -2702,12 +2702,12 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
root_iblock_addr = root_iblock->addr;
/* get the status of the root iblock */
- HDassert(root_iblock_addr != HADDR_UNDEF);
+ assert(root_iblock_addr != HADDR_UNDEF);
if (H5AC_get_entry_status(f, root_iblock_addr, &root_iblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root iblock status")
root_iblock_in_cache = ((root_iblock_status & H5AC_ES__IN_CACHE) != 0);
- HDassert(root_iblock_in_cache || (root_iblock == NULL));
+ assert(root_iblock_in_cache || (root_iblock == NULL));
if (!root_iblock_in_cache) { /* we are done */
*clean = TRUE;
@@ -2723,7 +2723,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*/
if (H5AC_flush_dependency_exists(f, hdr->heap_addr, root_iblock_addr, &fd_exists) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency")
- HDassert(fd_exists);
+ assert(fd_exists);
*fd_clean = FALSE;
} /* end else-if */
@@ -2806,7 +2806,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
*/
if (H5AC_get_entry_ptr_from_addr(f, root_iblock_addr, (void **)(&root_iblock)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "H5AC_get_entry_ptr_from_addr() failed.")
- HDassert(root_iblock);
+ assert(root_iblock);
} /* end else */
} /* end if */
else { /* root_iblock != NULL */
@@ -2842,7 +2842,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
H5_END_TAG
unprotect_root_iblock = TRUE;
- HDassert(iblock == root_iblock);
+ assert(iblock == root_iblock);
} /* end if */
} /* end else */
@@ -2850,7 +2850,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
* in memory for the duration of the call. Do some sanity checks,
* and then call H5HF__cache_verify_iblock_descendants_clean().
*/
- HDassert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
if (H5HF__cache_verify_iblock_descendants_clean(f, hdr->heap_addr, root_iblock,
&root_iblock_status, fd_clean, clean) < 0)
@@ -2858,7 +2858,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
/* Unprotect the root indirect block if required */
if (unprotect_root_iblock) {
- HDassert(root_iblock);
+ assert(root_iblock);
if (H5AC_unprotect(f, H5AC_FHEAP_IBLOCK, root_iblock_addr, root_iblock, H5AC__NO_FLAGS_SET) <
0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() failed.")
@@ -2879,7 +2879,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_
if (root_dblock_status & H5AC_ES__IN_CACHE) {
if (H5AC_verify_entry_type(f, root_dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type")
- HDassert(in_cache);
+ assert(in_cache);
if (!type_ok)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock addr doesn't refer to a dblock?!?")
@@ -3004,14 +3004,14 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(iblock_status);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be TRUE */
+ assert(f);
+ assert(H5_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(iblock_status);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be TRUE */
if ((*fd_clean) && H5HF__cache_verify_iblocks_dblocks_clean(f, fd_parent_addr, iblock, fd_clean, clean,
&has_dblocks) < 0)
@@ -3122,21 +3122,21 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be true */
- HDassert(has_dblocks);
+ assert(f);
+ assert(H5_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be true */
+ assert(has_dblocks);
i = 0;
num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
- HDassert(num_direct_rows <= iblock->nrows);
+ assert(num_direct_rows <= iblock->nrows);
max_dblock_index = (num_direct_rows * iblock->hdr->man_dtable.cparam.width) - 1;
iblock_addr = iblock->addr;
- HDassert(H5_addr_defined(iblock_addr));
+ assert(H5_addr_defined(iblock_addr));
while ((*fd_clean) && (i <= max_dblock_index)) {
haddr_t dblock_addr;
@@ -3159,7 +3159,7 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_
if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get dblock status")
- HDassert(dblock_status & H5AC_ES__IN_CACHE);
+ assert(dblock_status & H5AC_ES__IN_CACHE);
*has_dblocks = TRUE;
@@ -3286,16 +3286,16 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDassert(f);
- HDassert(H5_addr_defined(fd_parent_addr));
- HDassert(iblock);
- HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(fd_clean);
- HDassert(*fd_clean);
- HDassert(clean); /* note that *clean need not be true */
- HDassert(has_iblocks);
+ assert(f);
+ assert(H5_addr_defined(fd_parent_addr));
+ assert(iblock);
+ assert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(fd_clean);
+ assert(*fd_clean);
+ assert(clean); /* note that *clean need not be true */
+ assert(has_iblocks);
num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
- HDassert(num_direct_rows <= iblock->nrows);
+ assert(num_direct_rows <= iblock->nrows);
iblock_addr = iblock->addr;
first_iblock_index = num_direct_rows * iblock->hdr->man_dtable.cparam.width;
@@ -3426,13 +3426,13 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
"H5AC_get_entry_ptr_from_addr() failed.")
- HDassert(child_iblock);
+ assert(child_iblock);
} /* end else */
} /* end if */
else {
/* child iblock is pinned -- look it up in the */
/* parent iblocks child_iblocks array. */
- HDassert(iblock->child_iblocks);
+ assert(iblock->child_iblocks);
child_iblock = iblock->child_iblocks[i - first_iblock_index];
} /* end else */
@@ -3440,9 +3440,9 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5
* a pointer to the child iblock. Verify that we
* that we have the correct one.
*/
- HDassert(child_iblock);
- HDassert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(child_iblock->addr == child_iblock_addr);
+ assert(child_iblock);
+ assert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ assert(child_iblock->addr == child_iblock_addr);
/* now make the recursive call */
if (H5HF__cache_verify_iblock_descendants_clean(