summaryrefslogtreecommitdiffstats
path: root/src/H5FDint.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/H5FDint.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/H5FDint.c')
-rw-r--r--src/H5FDint.c274
1 files changed, 137 insertions, 137 deletions
diff --git a/src/H5FDint.c b/src/H5FDint.c
index b0fe040..b10c386 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -156,8 +156,8 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr)
FUNC_ENTER_NOAPI_NOINIT
/* Sanity checks */
- HDassert(file);
- HDassert(sig_addr);
+ assert(file);
+ assert(sig_addr);
/* Find the least N such that 2^N is larger than the file size */
eof = H5FD_get_eof(file, H5FD_MEM_SUPER);
@@ -216,9 +216,9 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(buf);
+ assert(file);
+ assert(file->cls);
+ assert(buf);
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -278,9 +278,9 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert(buf);
+ assert(file);
+ assert(file->cls);
+ assert(buf);
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -365,18 +365,18 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -518,7 +518,7 @@ done:
/* undo the base addr offset to the addrs array if necessary */
if (addrs_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -582,18 +582,18 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -724,7 +724,7 @@ done:
/* undo the base addr offset to the addrs array if necessary */
if (addrs_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -794,13 +794,13 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Check if we're using vector I/O */
use_vector = file->cls->read_vector != NULL;
@@ -808,8 +808,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (count > 0) {
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert(element_sizes[0] != 0);
- HDassert(bufs[0] != NULL);
+ assert(element_sizes[0] != 0);
+ assert(bufs[0] != NULL);
/* Allocate sequence lists for memory and file spaces */
if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -868,7 +868,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
{
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(mem_spaces[i])) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
- HDassert((hssize_t)nelmts == hss_nelmts);
+ assert((hssize_t)nelmts == hss_nelmts);
}
#endif /* NDEBUG */
@@ -886,23 +886,23 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &file_nseq,
&seq_nelem, file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(file_nseq > 0);
+ assert(file_nseq > 0);
nelmts -= seq_nelem;
file_seq_i = 0;
}
- HDassert(file_seq_i < file_nseq);
+ assert(file_seq_i < file_nseq);
/* Fill/refill memory sequence list if necessary */
if (mem_seq_i == H5FD_SEQ_LIST_LEN) {
if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &mem_nseq, &seq_nelem,
mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(mem_nseq > 0);
+ assert(mem_nseq > 0);
mem_seq_i = 0;
}
- HDassert(mem_seq_i < mem_nseq);
+ assert(mem_seq_i < mem_nseq);
/* Calculate length of this IO */
io_len = MIN(file_len[file_seq_i], mem_len[mem_seq_i]);
@@ -913,8 +913,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
if (vec_arr_nused == vec_arr_nalloc) {
/* Check if we're using the static arrays */
if (addrs == addrs_local) {
- HDassert(sizes == sizes_local);
- HDassert(vec_bufs == vec_bufs_local);
+ assert(sizes == sizes_local);
+ assert(vec_bufs == vec_bufs_local);
/* Allocate dynamic arrays */
if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2)))
@@ -1037,9 +1037,9 @@ done:
}
/* Make sure we cleaned up */
- HDassert(!addrs || addrs == addrs_local);
- HDassert(!sizes || sizes == sizes_local);
- HDassert(!vec_bufs || vec_bufs == vec_bufs_local);
+ assert(!addrs || addrs == addrs_local);
+ assert(!sizes || sizes == sizes_local);
+ assert(!vec_bufs || vec_bufs == vec_bufs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__read_selection_translate() */
@@ -1100,18 +1100,18 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1204,7 +1204,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1264,18 +1264,18 @@ H5FD_read_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_space_ids) || (count == 0));
- HDassert((file_space_ids) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_space_ids) || (count == 0));
+ assert((file_space_ids) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1366,7 +1366,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1441,13 +1441,13 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Check if we're using vector I/O */
use_vector = file->cls->write_vector != NULL;
@@ -1455,8 +1455,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (count > 0) {
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert(element_sizes[0] != 0);
- HDassert(bufs[0] != NULL);
+ assert(element_sizes[0] != 0);
+ assert(bufs[0] != NULL);
/* Allocate sequence lists for memory and file spaces */
if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
@@ -1515,7 +1515,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
{
if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(mem_spaces[i])) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
- HDassert((hssize_t)nelmts == hss_nelmts);
+ assert((hssize_t)nelmts == hss_nelmts);
}
#endif /* NDEBUG */
@@ -1533,23 +1533,23 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &file_nseq,
&seq_nelem, file_off, file_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(file_nseq > 0);
+ assert(file_nseq > 0);
nelmts -= seq_nelem;
file_seq_i = 0;
}
- HDassert(file_seq_i < file_nseq);
+ assert(file_seq_i < file_nseq);
/* Fill/refill memory sequence list if necessary */
if (mem_seq_i == H5FD_SEQ_LIST_LEN) {
if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, H5FD_SEQ_LIST_LEN, SIZE_MAX, &mem_nseq, &seq_nelem,
mem_off, mem_len) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
- HDassert(mem_nseq > 0);
+ assert(mem_nseq > 0);
mem_seq_i = 0;
}
- HDassert(mem_seq_i < mem_nseq);
+ assert(mem_seq_i < mem_nseq);
/* Calculate length of this IO */
io_len = MIN(file_len[file_seq_i], mem_len[mem_seq_i]);
@@ -1560,8 +1560,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
if (vec_arr_nused == vec_arr_nalloc) {
/* Check if we're using the static arrays */
if (addrs == addrs_local) {
- HDassert(sizes == sizes_local);
- HDassert(vec_bufs == vec_bufs_local);
+ assert(sizes == sizes_local);
+ assert(vec_bufs == vec_bufs_local);
/* Allocate dynamic arrays */
if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2)))
@@ -1684,9 +1684,9 @@ done:
}
/* Make sure we cleaned up */
- HDassert(!addrs || addrs == addrs_local);
- HDassert(!sizes || sizes == sizes_local);
- HDassert(!vec_bufs || vec_bufs == vec_bufs_local);
+ assert(!addrs || addrs == addrs_local);
+ assert(!sizes || sizes == sizes_local);
+ assert(!vec_bufs || vec_bufs == vec_bufs_local);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__write_selection_translate() */
@@ -1745,18 +1745,18 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_spaces) || (count == 0));
- HDassert((file_spaces) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_spaces) || (count == 0));
+ assert((file_spaces) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1843,7 +1843,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -1900,18 +1900,18 @@ H5FD_write_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
- HDassert(file);
- HDassert(file->cls);
- HDassert((mem_space_ids) || (count == 0));
- HDassert((file_space_ids) || (count == 0));
- HDassert((offsets) || (count == 0));
- HDassert((element_sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert(file);
+ assert(file->cls);
+ assert((mem_space_ids) || (count == 0));
+ assert((file_space_ids) || (count == 0));
+ assert((offsets) || (count == 0));
+ assert((element_sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* Verify that the first elements of the element_sizes and bufs arrays are
* valid. */
- HDassert((count == 0) || (element_sizes[0] != 0));
- HDassert((count == 0) || (bufs[0] != NULL));
+ assert((count == 0) || (element_sizes[0] != 0));
+ assert((count == 0) || (bufs[0] != NULL));
/* Get proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();
@@ -1996,7 +1996,7 @@ done:
/* undo the base addr offset to the offsets array if necessary */
if (offsets_cooked) {
- HDassert(file->base_addr > 0);
+ assert(file->base_addr > 0);
for (i = 0; i < count; i++) {
@@ -2034,8 +2034,8 @@ H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
FUNC_ENTER_NOAPI(FAIL)
- HDassert(file && file->cls);
- HDassert(H5_addr_defined(addr) && addr <= file->maxaddr);
+ assert(file && file->cls);
+ assert(H5_addr_defined(addr) && addr <= file->maxaddr);
/* Dispatch to driver, convert to absolute address */
if ((file->cls->set_eoa)(file, type, addr + file->base_addr) < 0)
@@ -2068,7 +2068,7 @@ H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(file && file->cls);
+ assert(file && file->cls);
/* Dispatch to driver */
if (HADDR_UNDEF == (ret_value = (file->cls->get_eoa)(file, type)))
@@ -2104,7 +2104,7 @@ H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type)
FUNC_ENTER_NOAPI(HADDR_UNDEF)
- HDassert(file && file->cls);
+ assert(file && file->cls);
/* Dispatch to driver */
if (file->cls->get_eof) {
@@ -2140,8 +2140,8 @@ H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags /*out*/)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- HDassert(driver);
- HDassert(flags);
+ assert(driver);
+ assert(flags);
/* Check for the driver to query and then query it */
if (driver->query)
@@ -2194,8 +2194,8 @@ H5FD__vsrt_tmp_cmp(const void *element_1, const void *element_2)
FUNC_ENTER_PACKAGE_NOERR
/* Sanity checks */
- HDassert(H5_addr_defined(addr_1));
- HDassert(H5_addr_defined(addr_2));
+ assert(H5_addr_defined(addr_1));
+ assert(H5_addr_defined(addr_2));
/* Compare the addresses */
if (H5_addr_gt(addr_1, addr_2))
@@ -2220,27 +2220,27 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
/* Sanity checks */
- HDassert(vector_was_sorted);
+ assert(vector_was_sorted);
- HDassert((types) || (count == 0));
- HDassert((addrs) || (count == 0));
- HDassert((sizes) || (count == 0));
- HDassert((bufs) || (count == 0));
+ assert((types) || (count == 0));
+ assert((addrs) || (count == 0));
+ assert((sizes) || (count == 0));
+ assert((bufs) || (count == 0));
/* verify that the first elements of the sizes and types arrays are
* valid.
*/
- HDassert((count == 0) || (sizes[0] != 0));
- HDassert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
+ assert((count == 0) || (sizes[0] != 0));
+ assert((count == 0) || (types[0] != H5FD_MEM_NOLIST));
- HDassert((count == 0) || ((s_types_ptr) && (NULL == *s_types_ptr)));
- HDassert((count == 0) || ((s_addrs_ptr) && (NULL == *s_addrs_ptr)));
- HDassert((count == 0) || ((s_sizes_ptr) && (NULL == *s_sizes_ptr)));
- HDassert((count == 0) || ((s_bufs_ptr) && (NULL == *s_bufs_ptr)));
+ assert((count == 0) || ((s_types_ptr) && (NULL == *s_types_ptr)));
+ assert((count == 0) || ((s_addrs_ptr) && (NULL == *s_addrs_ptr)));
+ assert((count == 0) || ((s_sizes_ptr) && (NULL == *s_sizes_ptr)));
+ assert((count == 0) || ((s_bufs_ptr) && (NULL == *s_bufs_ptr)));
/* scan the addrs array to see if it is sorted */
for (i = 1; i < count; i++) {
- HDassert(H5_addr_defined(addrs[i - 1]));
+ assert(H5_addr_defined(addrs[i - 1]));
if (H5_addr_gt(addrs[i - 1], addrs[i]))
break;
@@ -2299,7 +2299,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
i = 1;
for (i = 1; i < count; i++) {
- HDassert(H5_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr));
+ assert(H5_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr));
if (H5_addr_eq(addrs[i - 1], addrs[i]))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector")
@@ -2314,8 +2314,8 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sorted vector(s)")
}
- HDassert(sizes[0] != 0);
- HDassert(types[0] != H5FD_MEM_NOLIST);
+ assert(sizes[0] != 0);
+ assert(types[0] != H5FD_MEM_NOLIST);
/* Scan the sizes and types vectors to determine if the fixed size / type
* optimization is in use, and if so, to determine the index of the last
@@ -2330,8 +2330,8 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t
fixed_type_index = i - 1;
}
- HDassert(fixed_size_index <= count);
- HDassert(fixed_type_index <= count);
+ assert(fixed_size_index <= count);
+ assert(fixed_type_index <= count);
/* Populate the sorted vectors. Note that the index stored in srt_tmp
* refers to the index in the unsorted array, while the position of
@@ -2413,7 +2413,7 @@ H5FD_delete(const char *filename, hid_t fapl_id)
/* Sanity checks */
- HDassert(filename);
+ assert(filename);
/* Get file access property list */
if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -2462,9 +2462,9 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
FUNC_ENTER_NOAPI_NOERR
/* Sanity checks */
- HDassert(cls);
- HDassert(key);
- HDassert(success);
+ assert(cls);
+ assert(key);
+ assert(success);
/* Which kind of key are we looking for? */
if (key->vfd.kind == H5FD_GET_DRIVER_BY_NAME) {
@@ -2474,7 +2474,7 @@ H5FD_check_plugin_load(const H5FD_class_t *cls, const H5PL_key_t *key, hbool_t *
}
else {
/* Sanity check */
- HDassert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
+ assert(key->vfd.kind == H5FD_GET_DRIVER_BY_VALUE);
/* Check if plugin value matches VFD class value */
if (cls->value == key->vfd.u.value)
@@ -2511,7 +2511,7 @@ H5FD__get_driver_cb(void *obj, hid_t id, void *_op_data)
} /* end if */
} /* end if */
else {
- HDassert(H5FD_GET_DRIVER_BY_VALUE == op_data->key.kind);
+ assert(H5FD_GET_DRIVER_BY_VALUE == op_data->key.kind);
if (cls->value == op_data->key.u.value) {
op_data->found_id = id;
ret_value = H5_ITER_STOP;
@@ -2549,7 +2549,7 @@ H5FD_register_driver_by_name(const char *name, hbool_t app_ref)
/* If driver is already registered, increment ref count on ID and return ID */
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, app_ref) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD")
@@ -2603,7 +2603,7 @@ H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref)
/* If driver is already registered, increment ref count on ID and return ID */
if (driver_is_registered) {
- HDassert(driver_id >= 0);
+ assert(driver_id >= 0);
if (H5I_inc_ref(driver_id, app_ref) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD")