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/H5Oshared.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/H5Oshared.c')
-rw-r--r-- | src/H5Oshared.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c index a6af84e..4483b44 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -110,15 +110,15 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t FUNC_ENTER_PACKAGE /* check args */ - HDassert(f); - HDassert(shared); - HDassert(type); - HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE); + assert(f); + assert(shared); + assert(type); + assert(type->share_flags & H5O_SHARE_IS_SHARABLE); /* This message could have a heap ID (SOHM) or the address of an object * header on disk (named datatype) */ - HDassert(H5O_IS_STORED_SHARED(shared->type)); + assert(H5O_IS_STORED_SHARED(shared->type)); /* Check for implicit shared object header message */ if (shared->type == H5O_SHARE_TYPE_SOHM) { @@ -157,7 +157,7 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t else { H5O_loc_t oloc; /* Location for object header where message is stored */ - HDassert(shared->type == H5O_SHARE_TYPE_COMMITTED); + assert(shared->type == H5O_SHARE_TYPE_COMMITTED); /* Build the object location for the shared message's object header */ oloc.file = f; @@ -219,8 +219,8 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ FUNC_ENTER_PACKAGE /* check args */ - HDassert(f); - HDassert(shared); + assert(f); + assert(shared); /* Check for type of shared message */ if (shared->type == H5O_SHARE_TYPE_COMMITTED) { @@ -259,7 +259,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ if (H5O__link_oh(f, adjust, open_oh, &deleted) < 0) HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") - HDassert(!deleted); + assert(!deleted); } else /* The shared message is in another object header */ @@ -267,7 +267,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") } /* end if */ else { - HDassert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE); + assert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE); /* Check for decrementing reference count on shared message */ if (adjust < 0) { @@ -309,9 +309,9 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b FUNC_ENTER_PACKAGE /* Check args */ - HDassert(f); - HDassert(buf); - HDassert(type); + assert(f); + assert(buf); + assert(type); /* Version */ version = *buf++; @@ -346,7 +346,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b * Otherwise, it is a named datatype, so copy an H5O_loc_t. */ if (sh_mesg.type == H5O_SHARE_TYPE_SOHM) { - HDassert(version >= H5O_SHARED_VERSION_3); + assert(version >= H5O_SHARED_VERSION_3); H5MM_memcpy(&sh_mesg.u.heap_id, buf, sizeof(sh_mesg.u.heap_id)); } /* end if */ else { @@ -393,9 +393,9 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_ FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(f); - HDassert(buf); - HDassert(sh_mesg); + assert(f); + assert(buf); + assert(sh_mesg); /* If this message is shared in the heap, we need to use version 3 of the * encoding and encode the SHARED_IN_HEAP flag. @@ -403,7 +403,7 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_ if (sh_mesg->type == H5O_SHARE_TYPE_SOHM) version = H5O_SHARED_VERSION_LATEST; else { - HDassert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED); + assert(sh_mesg->type == H5O_SHARE_TYPE_COMMITTED); version = H5O_SHARED_VERSION_2; /* version 1 is no longer used */ } /* end else */ @@ -439,8 +439,8 @@ H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src) FUNC_ENTER_NOAPI_NOINIT_NOERR /* check args */ - HDassert(dst); - HDassert(src); + assert(dst); + assert(src); /* copy */ *dst = *src; @@ -474,7 +474,7 @@ H5O__shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg) (size_t)H5F_SIZEOF_ADDR(f); /* Sharing by another obj hdr */ } /* end if */ else { - HDassert(sh_mesg->type == H5O_SHARE_TYPE_SOHM); + assert(sh_mesg->type == H5O_SHARE_TYPE_SOHM); ret_value = 1 + /* Version */ 1 + /* Type field */ H5O_FHEAP_ID_LEN; /* Shared in the heap */ @@ -503,8 +503,8 @@ H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_sh FUNC_ENTER_PACKAGE /* check args */ - HDassert(f); - HDassert(sh_mesg); + assert(f); + assert(sh_mesg); /* * Committed datatypes increment the OH of the original message when they @@ -544,8 +544,8 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar FUNC_ENTER_PACKAGE /* Check args */ - HDassert(f); - HDassert(sh_mesg); + assert(f); + assert(sh_mesg); /* Increment the reference count on the shared object */ if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, 1) < 0) @@ -582,13 +582,13 @@ H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst, FUNC_ENTER_PACKAGE /* check args */ - HDassert(file_src); - HDassert(file_dst); - HDassert(mesg_type); - HDassert(shared_src); - HDassert(shared_dst); - HDassert(recompute_size); - HDassert(cpy_info); + assert(file_src); + assert(file_dst); + assert(mesg_type); + assert(shared_src); + assert(shared_dst); + assert(recompute_size); + assert(cpy_info); /* Committed shared messages create a shared message at the destination * and also copy the committed object that they point to. @@ -647,9 +647,9 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O FUNC_ENTER_PACKAGE /* check args */ - HDassert(f); - HDassert(shared_src); - HDassert(shared_dst); + assert(f); + assert(shared_src); + assert(shared_dst); /* Copy the target of committed messages, try to share others */ if (shared_src->type == H5O_SHARE_TYPE_COMMITTED) { @@ -694,10 +694,10 @@ H5O__shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth FUNC_ENTER_PACKAGE_NOERR /* Check args */ - HDassert(mesg); - HDassert(stream); - HDassert(indent >= 0); - HDassert(fwidth >= 0); + assert(mesg); + assert(stream); + assert(indent >= 0); + assert(fwidth >= 0); switch (mesg->type) { case H5O_SHARE_TYPE_UNSHARED: |