summaryrefslogtreecommitdiffstats
path: root/src/H5T.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/H5T.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/H5T.c')
-rw-r--r--src/H5T.c232
1 files changed, 116 insertions, 116 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 516000a..2d8b2ec 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1388,7 +1388,7 @@ H5T_init(void)
/* Only register the default property list if it hasn't been created yet */
if (H5P_LST_DATATYPE_CREATE_ID_g == (-1)) {
/* ========== Datatype Creation Property Class Initialization ============*/
- HDassert(H5P_CLS_DATATYPE_CREATE_g != NULL);
+ assert(H5P_CLS_DATATYPE_CREATE_g != NULL);
/* Register the default datatype creation property list */
if ((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0)
@@ -1446,8 +1446,8 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_ENTER_PACKAGE_NOERR
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
if (H5T_STATE_IMMUTABLE == dt->shared->state) {
dt->shared->state = H5T_STATE_RDONLY;
@@ -1486,7 +1486,7 @@ H5T_top_term_package(void)
H5T_path_t *path;
path = H5T_g.path[i];
- HDassert(path);
+ assert(path);
if (path->conv.u.app_func) {
H5T__print_stats(path, &nprint /*in,out*/);
path->cdata.command = H5T_CONV_FREE;
@@ -1680,7 +1680,7 @@ H5T_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(0 == H5I_nmembers(H5I_DATATYPE));
+ assert(0 == H5I_nmembers(H5I_DATATYPE));
/* Destroy the datatype object id group */
n += (H5I_dec_type_ref(H5I_DATATYPE) > 0);
@@ -1705,8 +1705,8 @@ H5T__close_cb(H5T_t *dt, void **request)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
/* If this datatype is VOL-managed (i.e.: has a VOL object),
* close it through the VOL connector.
@@ -2105,7 +2105,7 @@ H5T_get_class(const H5T_t *dt, htri_t internal)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
/* Externally, a VL string is a string; internally, a VL string is a VL. */
if (internal) {
@@ -2177,8 +2177,8 @@ H5T_detect_class(const H5T_t *dt, H5T_class_t cls, hbool_t from_api)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
- HDassert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
+ assert(dt);
+ assert(cls > H5T_NO_CLASS && cls < H5T_NCLASSES);
/* Consider VL string as a string for API, as a VL for internal use. */
/* (note that this check must be performed before checking if the VL
@@ -2438,7 +2438,7 @@ H5T_get_super(const H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
if (!dt->shared->parent)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "not a derived data type");
@@ -2469,11 +2469,11 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
- HDassert(name && *name);
- HDassert(src);
- HDassert(dst);
- HDassert(func);
+ assert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
+ assert(name && *name);
+ assert(src);
+ assert(dst);
+ assert(func);
/* Set up conversion function wrapper */
conv_func.is_app = FALSE;
@@ -2520,11 +2520,11 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(src);
- HDassert(dst);
- HDassert(conv);
- HDassert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
- HDassert(name && *name);
+ assert(src);
+ assert(dst);
+ assert(conv);
+ assert(H5T_PERS_HARD == pers || H5T_PERS_SOFT == pers);
+ assert(name && *name);
if (H5T_PERS_HARD == pers) {
/* Only bother to register the path if it's not a no-op path (for this machine) */
@@ -2569,7 +2569,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
*/
for (i = 1; i < H5T_g.npaths; i++) {
old_path = H5T_g.path[i];
- HDassert(old_path);
+ assert(old_path);
/* Does the new soft conversion function apply to this path? */
if (old_path->is_hard || old_path->src->shared->type != src->shared->type ||
@@ -2757,7 +2757,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
if (H5T_PERS_DONTCARE == pers || H5T_PERS_SOFT == pers) {
for (i = H5T_g.nsoft - 1; i >= 0; --i) {
soft = H5T_g.soft + i;
- HDassert(soft);
+ assert(soft);
if (name && *name && HDstrcmp(name, soft->name) != 0)
continue;
if (src && src->shared->type != soft->src)
@@ -2776,7 +2776,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
/* Remove matching conversion paths, except no-op path */
for (i = H5T_g.npaths - 1; i > 0; --i) {
path = H5T_g.path[i];
- HDassert(path);
+ assert(path);
/* Not a match */
if (((H5T_PERS_SOFT == pers && path->is_hard) || (H5T_PERS_HARD == pers && !path->is_hard)) ||
@@ -3562,7 +3562,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo
if (NULL == (tmp = (*copyfn)(old_dt->shared->u.compnd.memb[i].type)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy compound field's datatype")
new_dt->shared->u.compnd.memb[i].type = tmp;
- HDassert(tmp != NULL);
+ assert(tmp != NULL);
/* Range check against compound member's offset */
if ((accum_change < 0) &&
@@ -3727,7 +3727,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(old_dt);
+ assert(old_dt);
/* Allocate and copy core datatype information */
if (NULL == (new_dt = H5T__initiate_copy(old_dt)))
@@ -3769,7 +3769,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
done:
if (ret_value == NULL)
if (new_dt) {
- HDassert(new_dt->shared);
+ assert(new_dt->shared);
if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
@@ -3803,7 +3803,7 @@ H5T_copy_reopen(H5T_t *old_dt)
FUNC_ENTER_NOAPI(NULL)
/* check args */
- HDassert(old_dt);
+ assert(old_dt);
/* Allocate and copy core datatype information */
if (NULL == (new_dt = H5T__initiate_copy(old_dt)))
@@ -3876,7 +3876,7 @@ H5T_copy_reopen(H5T_t *old_dt)
done:
if (ret_value == NULL)
if (new_dt) {
- HDassert(new_dt->shared);
+ assert(new_dt->shared);
if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared);
@@ -3909,7 +3909,7 @@ H5T_lock(H5T_t *dt, hbool_t immutable)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -3974,7 +3974,7 @@ done:
if (ret_value == NULL)
if (dt) {
if (dt->shared) {
- HDassert(!dt->shared->owned_vol_obj);
+ assert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
dt = H5FL_FREE(H5T_t, dt);
@@ -4005,7 +4005,7 @@ H5T__free(H5T_t *dt)
FUNC_ENTER_PACKAGE
- HDassert(dt && dt->shared);
+ assert(dt && dt->shared);
/* Free the ID to name info */
H5G_name_free(&(dt->path));
@@ -4053,7 +4053,7 @@ H5T__free(H5T_t *dt)
dt->shared->type = H5T_NO_CLASS;
/* Close the parent */
- HDassert(dt->shared->parent != dt);
+ assert(dt->shared->parent != dt);
if (dt->shared->parent && H5T_close_real(dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type")
dt->shared->parent = NULL;
@@ -4090,14 +4090,14 @@ H5T_close_real(H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt && dt->shared);
+ assert(dt && dt->shared);
/* Clean up resources, depending on shared state */
if (dt->shared->state != H5T_STATE_OPEN) {
if (H5T__free(dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
- HDassert(!dt->shared->owned_vol_obj);
+ assert(!dt->shared->owned_vol_obj);
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
} /* end if */
else
@@ -4132,8 +4132,8 @@ H5T_close(H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
/* Named datatype cleanups */
if (dt->shared->state == H5T_STATE_OPEN) {
@@ -4141,9 +4141,9 @@ H5T_close(H5T_t *dt)
dt->shared->fo_count--;
/* Sanity checks */
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
- HDassert(H5_addr_defined(dt->sh_loc.u.loc.oh_addr));
- HDassert(H5_addr_defined(dt->oloc.addr));
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(H5_addr_defined(dt->sh_loc.u.loc.oh_addr));
+ assert(H5_addr_defined(dt->oloc.addr));
/* If a named type is being closed then close the object header and
* remove from the list of open objects in the file.
@@ -4231,11 +4231,11 @@ H5T__set_size(H5T_t *dt, size_t size)
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(size != 0);
- HDassert(H5T_REFERENCE != dt->shared->type);
- HDassert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
+ assert(dt);
+ assert(dt->shared);
+ assert(size != 0);
+ assert(H5T_REFERENCE != dt->shared->type);
+ assert(!(H5T_ENUM == dt->shared->type && 0 == dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
if (H5T__set_size(dt->shared->parent, size) < 0)
@@ -4301,7 +4301,7 @@ H5T__set_size(H5T_t *dt, size_t size)
/* Compound must not have been packed previously */
/* We will check if resizing changed the packed state of
* this type at the end of this function */
- HDassert(!dt->shared->u.compnd.packed);
+ assert(!dt->shared->u.compnd.packed);
} /* end if */
break;
@@ -4366,16 +4366,16 @@ H5T__set_size(H5T_t *dt, size_t size)
case H5T_VLEN:
case H5T_ARRAY:
case H5T_REFERENCE:
- HDassert("can't happen" && 0);
+ assert("can't happen" && 0);
break;
case H5T_NO_CLASS:
case H5T_NCLASSES:
- HDassert("invalid type" && 0);
+ assert("invalid type" && 0);
break;
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
break;
} /* end switch */
@@ -4419,8 +4419,8 @@ H5T_get_size(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->size)
} /* end H5T_get_size() */
@@ -4445,8 +4445,8 @@ H5T_get_force_conv(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* check args */
- HDassert(dt);
- HDassert(dt->shared);
+ assert(dt);
+ assert(dt->shared);
FUNC_LEAVE_NOAPI(dt->shared->force_conv)
} /* end H5T_get_force_conv() */
@@ -4480,15 +4480,15 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
FUNC_ENTER_NOAPI(0)
/* Sanity check */
- HDassert(dt1);
- HDassert(dt2);
+ assert(dt1);
+ assert(dt2);
/* the easy case */
if (dt1 == dt2)
HGOTO_DONE(0);
- HDassert(dt1->shared);
- HDassert(dt2->shared);
+ assert(dt1->shared);
+ assert(dt2->shared);
/* compare */
if (dt1->shared->type < dt2->shared->type)
@@ -4561,10 +4561,10 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.compnd.nmembs - 1; u++) {
- HDassert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
- dt1->shared->u.compnd.memb[idx1[u + 1]].name));
- HDassert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
- dt2->shared->u.compnd.memb[idx2[u + 1]].name));
+ assert(HDstrcmp(dt1->shared->u.compnd.memb[idx1[u]].name,
+ dt1->shared->u.compnd.memb[idx1[u + 1]].name));
+ assert(HDstrcmp(dt2->shared->u.compnd.memb[idx2[u]].name,
+ dt2->shared->u.compnd.memb[idx2[u + 1]].name));
}
#endif
@@ -4658,9 +4658,9 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
#ifdef H5T_DEBUG
/* I don't quite trust the code above yet :-) --RPM */
for (u = 0; u < dt1->shared->u.enumer.nmembs - 1; u++) {
- HDassert(
+ assert(
HDstrcmp(dt1->shared->u.enumer.name[idx1[u]], dt1->shared->u.enumer.name[idx1[u + 1]]));
- HDassert(
+ assert(
HDstrcmp(dt2->shared->u.enumer.name[idx2[u]], dt2->shared->u.enumer.name[idx2[u + 1]]));
}
#endif
@@ -4718,12 +4718,12 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
break;
case H5T_VLEN:
- HDassert(dt1->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
- dt1->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
- HDassert(dt2->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
- dt2->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
- HDassert(dt1->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt1->shared->u.vlen.loc < H5T_LOC_MAXLOC);
- HDassert(dt2->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt2->shared->u.vlen.loc < H5T_LOC_MAXLOC);
+ assert(dt1->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
+ dt1->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
+ assert(dt2->shared->u.vlen.type > H5T_VLEN_BADTYPE &&
+ dt2->shared->u.vlen.type < H5T_VLEN_MAXTYPE);
+ assert(dt1->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt1->shared->u.vlen.loc < H5T_LOC_MAXLOC);
+ assert(dt2->shared->u.vlen.loc >= H5T_LOC_BADLOC && dt2->shared->u.vlen.loc < H5T_LOC_MAXLOC);
/* Arbitrarily sort sequence VL datatypes before string VL datatypes */
if (dt1->shared->u.vlen.type == H5T_VLEN_SEQUENCE &&
@@ -4909,7 +4909,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
case H5T_ARRAY:
case H5T_NCLASSES:
default:
- HDassert("not implemented yet" && 0);
+ assert("not implemented yet" && 0);
break;
}
break;
@@ -4953,10 +4953,10 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst)
FUNC_ENTER_NOAPI(NULL)
/* Sanity check */
- HDassert(src);
- HDassert(src->shared);
- HDassert(dst);
- HDassert(dst->shared);
+ assert(src);
+ assert(src->shared);
+ assert(dst);
+ assert(dst->shared);
/* Set up conversion function wrapper */
conv_func.is_app = FALSE;
@@ -5013,10 +5013,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(src);
- HDassert(src->shared);
- HDassert(dst);
- HDassert(dst->shared);
+ assert(src);
+ assert(src->shared);
+ assert(dst);
+ assert(dst->shared);
/*
* Make sure the first entry in the table is the no-op conversion path.
@@ -5065,7 +5065,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
- HDassert(H5T_g.path[md]);
+ assert(H5T_g.path[md]);
cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
if (0 == cmp)
cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
@@ -5114,8 +5114,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
*/
if (conv->u.app_func &&
(!table || (table && conv->is_app) || (table && !table->is_hard && !conv->is_app))) {
- HDassert(path != table);
- HDassert(NULL == path->conv.u.app_func);
+ assert(path != table);
+ assert(NULL == path->conv.u.app_func);
if (path->src && (src_id = H5I_register(H5I_DATATYPE, H5T_copy(path->src, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
"unable to register source conversion type for query")
@@ -5146,7 +5146,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
* for an applicable function and add it to the path. This can't happen
* for the no-op conversion path.
*/
- HDassert(path->conv.u.app_func || (src && dst));
+ assert(path->conv.u.app_func || (src && dst));
for (i = H5T_g.nsoft - 1; i >= 0 && !path->conv.u.app_func; --i) {
hbool_t path_init_error = FALSE;
@@ -5198,7 +5198,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
while (cmp && lt < rt) {
md = (lt + rt) / 2;
- HDassert(H5T_g.path[md]);
+ assert(H5T_g.path[md]);
cmp = H5T_cmp(src, H5T_g.path[md]->src, FALSE);
if (0 == cmp)
cmp = H5T_cmp(dst, H5T_g.path[md]->dst, FALSE);
@@ -5213,7 +5213,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
/* Replace an existing table entry or add a new entry */
if (table && path != table) {
- HDassert(table == H5T_g.path[md]);
+ assert(table == H5T_g.path[md]);
H5T__print_stats(table, &nprint /*in,out*/);
table->cdata.command = H5T_CONV_FREE;
if (table->conv.is_app) {
@@ -5245,7 +5245,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
H5T_g.path[md] = path;
} /* end if */
else if (path != table) {
- HDassert(cmp);
+ assert(cmp);
if ((size_t)H5T_g.npaths >= H5T_g.apaths) {
size_t na = MAX(128, 2 * H5T_g.apaths);
H5T_path_t **x;
@@ -5309,7 +5309,7 @@ H5T_path_noop(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0 == H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
@@ -5344,7 +5344,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
if (p->are_compounds)
ret_value = H5T__conv_struct_subset(&(p->cdata));
@@ -5368,7 +5368,7 @@ H5T_path_bkg(const H5T_path_t *p)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(p);
+ assert(p);
FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
@@ -5488,7 +5488,7 @@ H5T_oloc(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5497,7 +5497,7 @@ H5T_oloc(H5T_t *dt)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype")
case H5T_STATE_NAMED:
case H5T_STATE_OPEN:
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
ret_value = &dt->oloc;
break;
default:
@@ -5528,7 +5528,7 @@ H5T_nameof(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5567,7 +5567,7 @@ H5T_is_immutable(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->shared->state == H5T_STATE_IMMUTABLE)
ret_value = TRUE;
@@ -5591,7 +5591,7 @@ H5T_is_named(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->vol_obj)
ret_value = TRUE;
@@ -5625,11 +5625,11 @@ H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
- HDassert(f);
+ assert(dt);
+ assert(f);
if (H5T_is_named(dt) && (dt->sh_loc.file != f)) {
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
H5O_msg_reset_share(H5O_DTYPE_ID, dt);
if (H5O_loc_free(&dt->oloc) < 0)
@@ -5677,7 +5677,7 @@ H5T_get_ref_type(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->shared->type == H5T_REFERENCE)
ret_value = dt->shared->u.atomic.u.r.rtype;
@@ -5706,7 +5706,7 @@ H5T_is_sensible(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
switch (dt->shared->type) {
case H5T_COMPOUND:
@@ -5776,8 +5776,8 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(dt);
- HDassert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
+ assert(dt);
+ assert(loc >= H5T_LOC_BADLOC && loc < H5T_LOC_MAXLOC);
/* Datatypes can't change in size if the force_conv flag is not set */
if (dt->shared->force_conv) {
@@ -5937,7 +5937,7 @@ H5T_is_relocatable(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* VL and reference datatypes are relocatable */
if (H5T_detect_class(dt, H5T_VLEN, FALSE) || H5T_detect_class(dt, H5T_REFERENCE, FALSE))
@@ -5969,7 +5969,7 @@ H5T__detect_vlen_ref(const H5T_t *dt)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(dt);
+ assert(dt);
/* Check if this datatype is a vlen reference */
/* TODO currently H5T_STD_REF is always considered as a vlen type */
@@ -6036,7 +6036,7 @@ H5T_is_vl_storage(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* VL and region reference datatypes are stored in variable-length form */
if (H5T_detect_class(dt, H5T_VLEN, FALSE))
@@ -6072,8 +6072,8 @@ H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(op_value);
+ assert(dt);
+ assert(op_value);
/* Special behavior for each type of datatype */
switch (dt->shared->type) {
@@ -6128,7 +6128,7 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDassert(dt);
+ assert(dt);
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T__upgrade_version_cb, &new_version) <
@@ -6161,8 +6161,8 @@ H5T_set_version(H5F_t *f, H5T_t *dt)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(f);
- HDassert(dt);
+ assert(f);
+ assert(dt);
vers = H5O_dtype_ver_bounds[H5F_LOW_BOUND(f)];
if (vers > dt->shared->version) {
@@ -6202,8 +6202,8 @@ H5T_patch_file(H5T_t *dt, H5F_t *f)
FUNC_ENTER_NOAPI_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(f);
+ assert(dt);
+ assert(f);
if (H5T_STATE_OPEN == dt->shared->state || H5T_STATE_NAMED == dt->shared->state) {
dt->oloc.file = f;
@@ -6231,9 +6231,9 @@ H5T_patch_vlen_file(H5T_t *dt, H5VL_object_t *file)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(file);
+ assert(dt);
+ assert(dt->shared);
+ assert(file);
if ((dt->shared->type == H5T_VLEN) && dt->shared->u.vlen.file != file)
dt->shared->u.vlen.file = file;
@@ -6260,9 +6260,9 @@ H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj)
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
- HDassert(dt);
- HDassert(dt->shared);
- HDassert(vol_obj);
+ assert(dt);
+ assert(dt->shared);
+ assert(vol_obj);
/* Currently no support for owning multiple VOL objects, free the previous
* owned object. Currently this is only used for holding open VOL objects