summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /src/H5T.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c304
1 files changed, 152 insertions, 152 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 9cbf546..fb4dc0e 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1394,7 +1394,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)
@@ -1452,8 +1452,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;
@@ -1492,7 +1492,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;
@@ -1501,11 +1501,11 @@ H5T_top_term_package(void)
(size_t)0, (size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function "
- "0x%016zx failed to free private data for "
- "%s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function "
+ "0x%016zx failed to free private data for "
+ "%s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
} /* end if */
#endif
H5E_clear_stack(NULL); /*ignore the error*/
@@ -1516,11 +1516,11 @@ H5T_top_term_package(void)
(size_t)0, (size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function "
- "0x%016zx failed to free private data for "
- "%s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function "
+ "0x%016zx failed to free private data for "
+ "%s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
} /* end if */
#endif
H5E_clear_stack(NULL); /*ignore the error*/
@@ -1686,7 +1686,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);
@@ -1711,8 +1711,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.
@@ -2111,7 +2111,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) {
@@ -2183,8 +2183,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
@@ -2444,7 +2444,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");
@@ -2475,11 +2475,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;
@@ -2526,11 +2526,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) */
@@ -2575,7 +2575,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 ||
@@ -2586,7 +2586,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(tmp_did = H5I_register(H5I_DATATYPE, H5T_copy(old_path->dst, H5T_COPY_ALL), FALSE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
"unable to register data types for conv query")
- HDmemset(&cdata, 0, sizeof cdata);
+ memset(&cdata, 0, sizeof cdata);
cdata.command = H5T_CONV_INIT;
if (conv->is_app) {
if ((conv->u.app_func)(tmp_sid, tmp_did, &cdata, (size_t)0, (size_t)0, (size_t)0, NULL, NULL,
@@ -2631,10 +2631,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx "
- "failed to free private data for %s (ignored)\n",
- (size_t)old_path->conv.u.app_func, old_path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx "
+ "failed to free private data for %s (ignored)\n",
+ (size_t)old_path->conv.u.app_func, old_path->name);
#endif
} /* end if */
} /* end if */
@@ -2642,10 +2642,10 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx "
- "failed to free private data for %s (ignored)\n",
- (size_t)old_path->conv.u.lib_func, old_path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx "
+ "failed to free private data for %s (ignored)\n",
+ (size_t)old_path->conv.u.lib_func, old_path->name);
#endif
} /* end if */
(void)H5T_close_real(old_path->src);
@@ -2763,7 +2763,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)
@@ -2782,7 +2782,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)) ||
@@ -2811,10 +2811,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx failed "
- "to free private data for %s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx failed "
+ "to free private data for %s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
#endif
} /* end if */
} /* end if */
@@ -2822,10 +2822,10 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_c
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T),
- "H5T: conversion function 0x%016zx failed "
- "to free private data for %s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T),
+ "H5T: conversion function 0x%016zx failed "
+ "to free private data for %s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
#endif
} /* end if */
(void)H5T_close_real(path->src);
@@ -3568,7 +3568,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) &&
@@ -3726,7 +3726,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)))
@@ -3768,7 +3768,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);
@@ -3802,7 +3802,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)))
@@ -3875,7 +3875,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);
@@ -3908,7 +3908,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:
@@ -3973,7 +3973,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);
@@ -4004,7 +4004,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));
@@ -4052,7 +4052,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;
@@ -4089,14 +4089,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
@@ -4131,8 +4131,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) {
@@ -4140,9 +4140,9 @@ H5T_close(H5T_t *dt)
dt->shared->fo_count--;
/* Sanity checks */
- HDassert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
- HDassert(H5F_addr_defined(dt->sh_loc.u.loc.oh_addr));
- HDassert(H5F_addr_defined(dt->oloc.addr));
+ assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED);
+ assert(H5F_addr_defined(dt->sh_loc.u.loc.oh_addr));
+ assert(H5F_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.
@@ -4230,11 +4230,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)
@@ -4300,7 +4300,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;
@@ -4365,16 +4365,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 */
@@ -4418,8 +4418,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() */
@@ -4444,8 +4444,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() */
@@ -4479,15 +4479,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)
@@ -4560,10 +4560,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
@@ -4657,9 +4657,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
@@ -4707,8 +4707,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, hbool_t superset)
idx = u;
} /* end else */
- tmp = HDmemcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
- (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
+ tmp = memcmp((uint8_t *)dt1->shared->u.enumer.value + idx1[u] * base_size,
+ (uint8_t *)dt2->shared->u.enumer.value + idx2[idx] * base_size, base_size);
if (tmp < 0)
HGOTO_DONE(-1);
if (tmp > 0)
@@ -4717,12 +4717,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 &&
@@ -4908,7 +4908,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;
@@ -4952,10 +4952,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;
@@ -5012,10 +5012,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.
@@ -5035,7 +5035,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
+ fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
#endif
H5E_clear_stack(NULL); /*ignore the error*/
} /* end if */
@@ -5064,7 +5064,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);
@@ -5113,8 +5113,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")
@@ -5145,7 +5145,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;
@@ -5161,14 +5161,14 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
if (H5T_g.soft[i].conv.is_app) {
if ((H5T_g.soft[i].conv.u.app_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
} /* end if */
else if ((H5T_g.soft[i].conv.u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0,
(size_t)0, NULL, NULL) < 0) {
- HDmemset(&(path->cdata), 0, sizeof(H5T_cdata_t));
+ memset(&(path->cdata), 0, sizeof(H5T_cdata_t));
H5E_clear_stack(NULL); /*ignore the error*/
path_init_error = TRUE;
} /* end if */
@@ -5197,7 +5197,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);
@@ -5212,7 +5212,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) {
@@ -5220,8 +5220,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL, H5CX_get_dxpl()) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
- (size_t)path->conv.u.app_func, path->name);
+ fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
+ (size_t)path->conv.u.app_func, path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
} /* end if */
@@ -5230,8 +5230,8 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co
(size_t)0, NULL, NULL) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T))
- HDfprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
- (size_t)path->conv.u.lib_func, path->name);
+ fprintf(H5DEBUG(T), "H5T: conversion function 0x%016zx free failed for %s (ignored)\n",
+ (size_t)path->conv.u.lib_func, path->name);
#endif
H5E_clear_stack(NULL); /*ignore the failure*/
} /* end if */
@@ -5244,7 +5244,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;
@@ -5308,7 +5308,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() */
@@ -5343,7 +5343,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));
@@ -5367,7 +5367,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() */
@@ -5487,7 +5487,7 @@ H5T_oloc(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5496,7 +5496,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:
@@ -5527,7 +5527,7 @@ H5T_nameof(H5T_t *dt)
FUNC_ENTER_NOAPI(NULL)
- HDassert(dt);
+ assert(dt);
switch (dt->shared->state) {
case H5T_STATE_TRANSIENT:
@@ -5566,7 +5566,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;
@@ -5590,7 +5590,7 @@ H5T_is_named(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
if (dt->vol_obj)
ret_value = TRUE;
@@ -5624,11 +5624,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)
@@ -5676,7 +5676,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;
@@ -5705,7 +5705,7 @@ H5T_is_sensible(const H5T_t *dt)
FUNC_ENTER_NOAPI_NOERR
- HDassert(dt);
+ assert(dt);
switch (dt->shared->type) {
case H5T_COMPOUND:
@@ -5775,8 +5775,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) {
@@ -5936,7 +5936,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))
@@ -5968,7 +5968,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 */
@@ -6035,7 +6035,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))
@@ -6071,8 +6071,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) {
@@ -6127,7 +6127,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) <
@@ -6160,8 +6160,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) {
@@ -6201,8 +6201,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;
@@ -6230,9 +6230,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;
@@ -6259,9 +6259,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