summaryrefslogtreecommitdiffstats
path: root/src/H5Omessage.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/H5Omessage.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/H5Omessage.c')
-rw-r--r--src/H5Omessage.c370
1 files changed, 185 insertions, 185 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 8dd8526..adf64c9 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -106,10 +106,10 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsi
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(loc);
+ assert(type_id < NELMTS(H5O_msg_class_g));
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -152,14 +152,14 @@ H5O_msg_append_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, un
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(type);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Append new message to object header */
if (H5O__msg_append_real(f, oh, type, mesg_flags, update_flags, mesg) < 0)
@@ -193,11 +193,11 @@ H5O__msg_append_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(mesg);
/* Allocate space for a new message */
if (H5O__msg_alloc(f, oh, type, &mesg_flags, mesg, &idx) < 0)
@@ -243,15 +243,15 @@ H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsig
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(type);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -296,14 +296,14 @@ H5O_msg_write_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, uns
FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(type);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Call the "real" modify routine */
if (H5O__msg_write_real(f, oh, type, mesg_flags, update_flags, mesg) < 0)
@@ -343,12 +343,12 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(type != H5O_MSG_ATTR);
- HDassert(mesg);
- HDassert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(type != H5O_MSG_ATTR);
+ assert(mesg);
+ assert(0 == (mesg_flags & ~H5O_MSG_FLAG_BITS));
/* Locate message of correct type */
for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++)
@@ -367,13 +367,13 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m
/* First, sanity check to make sure it's not a committed message;
* these can't ever be modified.
*/
- HDassert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
+ assert(((H5O_shared_t *)idx_msg->native)->type != H5O_SHARE_TYPE_COMMITTED);
/* Also, sanity check that a message doesn't switch status from being
* shared (or shareable) to being unshareable. (Which could cause
* a message to increase in size in the object header)
*/
- HDassert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
+ assert(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE));
/* Remove the old message from the SOHM index */
/* (It would be more efficient to try to share the message first, then
@@ -441,10 +441,10 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_TAG(loc->addr, NULL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -493,11 +493,11 @@ H5O_msg_read_oh(H5F_t *f, H5O_t *oh, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(oh);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Scan through the messages looking for the right one */
for (idx = 0; idx < oh->nmesgs; idx++)
@@ -547,9 +547,9 @@ H5O_msg_reset(unsigned type_id, void *native)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the "real" reset routine */
if (H5O__msg_reset_real(type, native) < 0)
@@ -581,7 +581,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(type);
+ assert(type);
if (native) {
if (type->reset) {
@@ -620,9 +620,9 @@ H5O_msg_free(unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the "real" free routine */
ret_value = H5O_msg_free_real(type, mesg);
@@ -648,7 +648,7 @@ H5O__msg_free_mesg(H5O_mesg_t *mesg)
FUNC_ENTER_PACKAGE_NOERR
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Free any native information */
mesg->native = H5O_msg_free_real(mesg->type, mesg->native);
@@ -676,7 +676,7 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(type);
+ assert(type);
if (msg_native) {
H5O__msg_reset_real(type, msg_native);
@@ -713,10 +713,10 @@ H5O_msg_copy(unsigned type_id, const void *mesg, void *dst)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(mesg);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(mesg);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Call the message class's copy routine */
if (NULL == (ret_value = (type->copy)(mesg, dst)))
@@ -752,12 +752,12 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Load the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -798,8 +798,8 @@ H5O__msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type)
FUNC_ENTER_PACKAGE_NOERR
/* Check args */
- HDassert(oh);
- HDassert(type);
+ assert(oh);
+ assert(type);
/* Loop over all messages, counting the ones of the type looked for */
for (u = ret_value = 0; u < oh->nmesgs; u++)
@@ -835,9 +835,9 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id)
FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL)
- HDassert(loc);
- HDassert(loc->file);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(type_id < NELMTS(H5O_msg_class_g));
/* Load the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -881,10 +881,10 @@ H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(oh);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(oh);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Scan through the messages looking for the right one */
for (u = 0; u < oh->nmesgs; u++)
@@ -924,13 +924,13 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -974,13 +974,13 @@ H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_oper
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(H5O_ATTR_ID != type_id); /* Attributes are modified in another routine */
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Pin the object header */
if (NULL == (oh = H5O_pin(loc)))
@@ -1022,7 +1022,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(mesg);
+ assert(mesg);
/* Check for callback routine */
if (udata->op) {
@@ -1087,9 +1087,9 @@ H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int seque
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
+ assert(f);
+ assert(oh);
+ assert(type);
/* Make certain we are allowed to modify the file */
if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR))
@@ -1157,13 +1157,13 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(op);
+ assert(type);
+ assert(op);
/* Protect the object header to iterate over */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
@@ -1223,11 +1223,11 @@ H5O__msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const H5
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(op);
- HDassert(op->u.app_op);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(op);
+ assert(op->u.app_op);
/* Iterate over messages */
for (sequence = 0, idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs && !ret_value; idx++, idx_msg++) {
@@ -1300,12 +1300,12 @@ H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Compute the raw data size for the mesg */
if (0 == (ret_value = (type->raw_size)(f, disable_shared, mesg)))
@@ -1342,12 +1342,12 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Get the property list */
if (NULL == (ocpl = (H5P_genplist_t *)H5I_object(ocpl_id)))
@@ -1400,12 +1400,12 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *m
FUNC_ENTER_NOAPI(0)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->raw_size);
- HDassert(f);
- HDassert(mesg);
+ assert(type);
+ assert(type->raw_size);
+ assert(f);
+ assert(mesg);
/* Compute the raw data size for the mesg */
if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0)
@@ -1450,10 +1450,10 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
+ assert(type);
+ assert(mesg);
/* If there is a can_share callback, use it */
if (type->can_share)
@@ -1468,7 +1468,7 @@ H5O_msg_can_share(unsigned type_id, const void *mesg)
/* If the message is shareable, both copy_file and post_copy_file must be
* defined */
- HDassert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
+ assert((type->post_copy_file && type->copy_file) || ret_value == FALSE);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_msg_can_share() */
@@ -1496,9 +1496,9 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Otherwise, the message can be shared if messages of this type are
* shareable in general; i.e., if they have the "is_sharable" flag
@@ -1538,10 +1538,10 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
else
#endif /* H5O_ENABLE_BOGUS */
{
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
+ assert(type);
+ assert(mesg);
/* If messages in a class aren't shareable, then obviously this message isn't shared! :-) */
if (type->share_flags & H5O_SHARE_IS_SHARABLE)
@@ -1575,13 +1575,13 @@ H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
- HDassert(mesg);
- HDassert(share);
- HDassert(share->type != H5O_SHARE_TYPE_UNSHARED);
+ assert(type);
+ assert(type->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(mesg);
+ assert(share);
+ assert(share->type != H5O_SHARE_TYPE_UNSHARED);
/* If there's a special action for this class that needs to be performed
* when setting the shared component, do that
@@ -1621,10 +1621,10 @@ H5O_msg_reset_share(unsigned H5_ATTR_NDEBUG_UNUSED type_id, void *mesg)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
- HDassert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
- HDassert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
- HDassert(mesg);
+ assert(type_id < NELMTS(H5O_msg_class_g));
+ assert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
+ assert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
+ assert(mesg);
/* Reset the shared component in the message to zero. */
HDmemset((H5O_shared_t *)mesg, 0, sizeof(H5O_shared_t));
@@ -1654,11 +1654,11 @@ H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt
FUNC_ENTER_NOAPI(FAIL)
/* Check args */
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(mesg);
- HDassert(crt_idx);
+ assert(type);
+ assert(mesg);
+ assert(crt_idx);
/* If there is a "get_crt_index callback, use it */
if (type->get_crt_index) {
@@ -1697,10 +1697,10 @@ H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Encode */
if ((type->encode)(f, disable_shared, buf, mesg) < 0)
@@ -1735,10 +1735,10 @@ H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, cons
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* decode */
if (NULL == (ret_value = (type->decode)(f, open_oh, 0, &ioflags, buf_size, buf)))
@@ -1775,13 +1775,13 @@ H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *native_sr
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(type);
- HDassert(type->copy_file);
- HDassert(file_src);
- HDassert(native_src);
- HDassert(file_dst);
- HDassert(recompute_size);
- HDassert(cpy_info);
+ assert(type);
+ assert(type->copy_file);
+ assert(file_src);
+ assert(native_src);
+ assert(file_dst);
+ assert(recompute_size);
+ assert(cpy_info);
/* The copy_file callback will return an H5O_shared_t only if the message
* to be copied is a committed datatype.
@@ -1818,13 +1818,13 @@ H5O__msg_alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(mesg_flags);
- HDassert(!(*mesg_flags & H5O_MSG_FLAG_SHARED));
- HDassert(type);
- HDassert(native);
- HDassert(mesg_idx);
+ assert(f);
+ assert(oh);
+ assert(mesg_flags);
+ assert(!(*mesg_flags & H5O_MSG_FLAG_SHARED));
+ assert(type);
+ assert(native);
+ assert(mesg_idx);
/* Check if message is already shared */
if ((shared_mesg = H5O_msg_is_shared(type->id, native)) < 0)
@@ -1884,11 +1884,11 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
- HDassert(type);
- HDassert(type->copy);
- HDassert(mesg);
+ assert(f);
+ assert(oh);
+ assert(type);
+ assert(type->copy);
+ assert(mesg);
/* Protect chunk */
if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx_msg->chunkno)))
@@ -1957,10 +1957,10 @@ H5O_msg_delete(H5F_t *f, H5O_t *open_oh, unsigned type_id, void *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(f);
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* delete */
if ((type->del) && (type->del)(f, open_oh, mesg) < 0)
@@ -1993,9 +1993,9 @@ H5O__delete_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(f);
- HDassert(mesg);
- HDassert(oh);
+ assert(f);
+ assert(mesg);
+ assert(oh);
/* Check if there is a file space deletion callback for this type of message */
if (type->del) {
@@ -2033,8 +2033,8 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Point into message's chunk's image */
p = mesg->raw - H5O_SIZEOF_MSGHDR_OH(oh);
@@ -2050,7 +2050,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
UINT16ENCODE(p, msg_id);
else
*p++ = (uint8_t)msg_id;
- HDassert(mesg->raw_size < H5O_MESG_MAX_SIZE);
+ assert(mesg->raw_size < H5O_MESG_MAX_SIZE);
UINT16ENCODE(p, mesg->raw_size);
*p++ = mesg->flags;
@@ -2066,15 +2066,15 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
if (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
UINT16ENCODE(p, mesg->crt_idx);
} /* end else */
- HDassert(p == mesg->raw);
+ assert(p == mesg->raw);
#ifndef NDEBUG
/* Make certain that null messages aren't in chunks w/gaps */
if (H5O_NULL_ID == msg_id)
- HDassert(oh->chunk[mesg->chunkno].gap == 0);
+ assert(oh->chunk[mesg->chunkno].gap == 0);
else
/* Non-null messages should always have a native pointer */
- HDassert(mesg->native);
+ assert(mesg->native);
#endif /* NDEBUG */
/* Encode the message itself, if it's not an "unknown" message */
@@ -2084,10 +2084,10 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
* encode a Shared Object message instead of the object
* which is being shared.
*/
- HDassert(mesg->raw >= oh->chunk[mesg->chunkno].image);
- HDassert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
- HDassert(mesg->raw + mesg->raw_size <=
- oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
+ assert(mesg->raw >= oh->chunk[mesg->chunkno].image);
+ assert(mesg->raw_size == H5O_ALIGN_OH(oh, mesg->raw_size));
+ assert(mesg->raw + mesg->raw_size <=
+ oh->chunk[mesg->chunkno].image + (oh->chunk[mesg->chunkno].size - H5O_SIZEOF_CHKSUM_OH(oh)));
#ifndef NDEBUG
/* Sanity check that the message won't overwrite past it's allocated space */
{
@@ -2095,10 +2095,10 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
msg_size = mesg->type->raw_size(f, FALSE, mesg->native);
msg_size = H5O_ALIGN_OH(oh, msg_size);
- HDassert(msg_size <= mesg->raw_size);
+ assert(msg_size <= mesg->raw_size);
}
#endif /* NDEBUG */
- HDassert(mesg->type->encode);
+ assert(mesg->type->encode);
if ((mesg->type->encode)(f, FALSE, mesg->raw, mesg->native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message")
} /* end if */
@@ -2132,8 +2132,8 @@ H5O__flush_msgs(H5F_t *f, H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(f);
- HDassert(oh);
+ assert(f);
+ assert(oh);
/* Encode any dirty messages */
for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++)
@@ -2178,12 +2178,12 @@ H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, uint8_t *flags)
FUNC_ENTER_NOAPI(FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5_addr_defined(loc->addr));
- HDassert(type_id < NELMTS(H5O_msg_class_g));
+ assert(loc);
+ assert(loc->file);
+ assert(H5_addr_defined(loc->addr));
+ assert(type_id < NELMTS(H5O_msg_class_g));
type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
+ assert(type);
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))