summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-19 14:09:44 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-19 14:09:44 (GMT)
commit628d267162895adef5a73e1cd5810030cc98335a (patch)
tree05471ae798eaef041ea98fecdd285c9380ce381a /src
parentd46ea2d08af456f1cfaf6c6fd3060f39b92be8de (diff)
parent7e93acd94f20c73d27bb2eb4f7b4389d88cfb299 (diff)
downloadhdf5-628d267162895adef5a73e1cd5810030cc98335a.zip
hdf5-628d267162895adef5a73e1cd5810030cc98335a.tar.gz
hdf5-628d267162895adef5a73e1cd5810030cc98335a.tar.bz2
merge and fix conflict
Diffstat (limited to 'src')
-rw-r--r--src/H5ACmpio.c2
-rw-r--r--src/H5Aint.c2
-rw-r--r--src/H5B2dbg.c6
-rw-r--r--src/H5B2internal.c4
-rw-r--r--src/H5B2leaf.c4
-rw-r--r--src/H5Clog_json.c2
-rw-r--r--src/H5Dbtree.c4
-rw-r--r--src/H5Dint.c7
-rw-r--r--src/H5Dnone.c2
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5EAcache.c4
-rw-r--r--src/H5EAtest.c2
-rw-r--r--src/H5FAcache.c6
-rw-r--r--src/H5FS.c3
-rw-r--r--src/H5FScache.c20
-rw-r--r--src/H5FSprivate.h2
-rw-r--r--src/H5Fsuper_cache.c10
-rw-r--r--src/H5Gnode.c2
-rw-r--r--src/H5HFcache.c16
-rw-r--r--src/H5HFsection.c12
-rw-r--r--src/H5HFspace.c2
-rw-r--r--src/H5HGcache.c4
-rw-r--r--src/H5HLcache.c10
-rw-r--r--src/H5MF.c2
-rw-r--r--src/H5Oainfo.c6
-rw-r--r--src/H5Oalloc.c2
-rw-r--r--src/H5Ocache.c6
-rw-r--r--src/H5Ocopy_ref.c3
-rw-r--r--src/H5Omessage.c2
-rw-r--r--src/H5Oshared.c4
-rw-r--r--src/H5Oshared.h2
-rw-r--r--src/H5Pfapl.c2
-rw-r--r--src/H5Pint.c8
-rw-r--r--src/H5Plapl.c2
-rw-r--r--src/H5R.c6
-rw-r--r--src/H5Rint.c39
-rw-r--r--src/H5Rpkg.h4
-rw-r--r--src/H5SL.c2
-rw-r--r--src/H5SMcache.c8
-rw-r--r--src/H5Tconv.c2
-rw-r--r--src/H5Tref.c7
-rw-r--r--src/H5private.h30
42 files changed, 142 insertions, 123 deletions
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index 56fedee..fadde28 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -498,7 +498,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_SANITY_CHECK *aux_ptr,
+H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_NDEBUG_UNUSED *aux_ptr,
int sync_point_op)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index f8d7edc..fc5ea34 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -2063,7 +2063,7 @@ done:
*/
H5A_t *
H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
- H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info)
+ H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info)
{
H5A_t *attr_dst = NULL; /* Destination attribute */
hid_t tid_src = -1; /* Datatype ID for source datatype */
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index dcae07c..b5b1c03 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -87,7 +87,7 @@
*/
herr_t
H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t H5_ATTR_SANITY_CHECK *type, haddr_t H5_ATTR_SANITY_CHECK obj_addr)
+ const H5B2_class_t H5_ATTR_NDEBUG_UNUSED *type, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header info */
unsigned u; /* Local index variable */
@@ -182,7 +182,7 @@ done:
*/
herr_t
H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_SANITY_CHECK obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_internal_t *internal = NULL; /* B-tree internal node */
@@ -294,7 +294,7 @@ done:
*/
herr_t
H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
- const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_SANITY_CHECK obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index f08237e..92c802e 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -1355,7 +1355,7 @@ done:
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr, const H5B2_internal_t *internal)
+H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_internal_t *internal)
{
hsize_t tot_all_nrec; /* Total number of records at or below this node */
uint16_t u, v; /* Local index variables */
@@ -1396,7 +1396,7 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_SANITY_C
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_internal2(hsize_t parent_all_nrec, const H5_ATTR_SANITY_CHECK H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2)
+H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2)
{
hsize_t tot_all_nrec; /* Total number of records at or below this node */
uint16_t u, v; /* Local index variables */
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index b50efad..7ed0468 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -1027,8 +1027,8 @@ done:
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr,
- const H5B2_leaf_t H5_ATTR_SANITY_CHECK *leaf)
+H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr,
+ const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf)
{
/* General sanity checking on node */
HDassert(leaf->nrec <= hdr->node_info->split_nrec);
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index 38aedf9..5ac354d 100644
--- a/src/H5Clog_json.c
+++ b/src/H5Clog_json.c
@@ -1281,7 +1281,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t H5_ATTR_SANITY_CHECK *config,
+H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t H5_ATTR_NDEBUG_UNUSED *config,
herr_t fxn_ret_value)
{
H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata);
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index aea4672..098e01b 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -253,7 +253,7 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__btree_new_node(H5F_t H5_ATTR_SANITY_CHECK *f, H5B_ins_t op, void *_lt_key, void *_udata,
+H5D__btree_new_node(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5B_ins_t op, void *_lt_key, void *_udata,
void *_rt_key, haddr_t *addr_p/*out*/)
{
H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
@@ -536,7 +536,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5D__btree_insert(H5F_t H5_ATTR_SANITY_CHECK *f, haddr_t H5_ATTR_SANITY_CHECK addr, void *_lt_key, hbool_t *lt_key_changed,
+H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED addr, void *_lt_key, hbool_t *lt_key_changed,
void *_md_key, void *_udata, void *_rt_key, hbool_t H5_ATTR_UNUSED *rt_key_changed,
haddr_t *new_node_p/*out*/)
{
diff --git a/src/H5Dint.c b/src/H5Dint.c
index a73d7ff..436a507 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -89,7 +89,7 @@ static herr_t H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overw
hsize_t old_dim[]);
static herr_t H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id);
static herr_t H5D__close_cb(H5VL_object_t *dset_vol_obj);
-static herr_t H5D__use_minimized_dset_headers(H5F_t *file, H5D_t *dset, hbool_t *minimize);
+static herr_t H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize);
static herr_t H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc);
static size_t H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr);
static void *H5D__vlen_get_buf_size_alloc(size_t size, void *info);
@@ -737,14 +737,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__use_minimized_dset_headers(H5F_t *file, H5D_t H5_ATTR_SANITY_CHECK *dset, hbool_t *minimize)
+H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT;
HDassert(file);
- HDassert(dset);
HDassert(minimize);
/* Get the dataset object header minimize flag for this call */
@@ -1015,7 +1014,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value info")
} /* end if */
- if(H5D__use_minimized_dset_headers(file, dset, &minimize_header) == FAIL)
+ if(H5D__use_minimized_dset_headers(file, &minimize_header) == FAIL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings")
if(TRUE == minimize_header) {
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index eb4e6b8..2093512 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -378,7 +378,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *idx_info_src,
+H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_info_src,
const H5D_chk_idx_info_t *idx_info_dst)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index 3d7400d..8efa771 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -437,7 +437,7 @@ H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *idx_info_src,
+H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_info_src,
const H5D_chk_idx_info_t *idx_info_dst)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 9aeb555..1d182a4 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -1543,7 +1543,7 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
-H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -2080,7 +2080,7 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len,
+H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_image, size_t H5_ATTR_UNUSED len,
void *_thing))
/* Local variables */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 6b47828..58e255a 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -279,7 +279,7 @@ END_FUNC(STATIC) /* end H5EA__test_encode() */
*/
BEGIN_FUNC(STATIC, NOERR,
herr_t, SUCCEED, -,
-H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_SANITY_CHECK *_ctx))
+H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_NDEBUG_UNUSED *_ctx))
/* Local variables */
#ifndef NDEBUG
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index acc21af..922153c 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -253,7 +253,7 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_verify_chksum() */
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
-H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -651,7 +651,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_verify_chksum() */
*/
BEGIN_FUNC(STATIC, ERR,
void *, NULL, NULL,
-H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -1178,7 +1178,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */
*/
BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
-H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len,
+H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_image, size_t H5_ATTR_UNUSED len,
void *_thing))
/* Local variables */
diff --git a/src/H5FS.c b/src/H5FS.c
index bd89bed..1bd56b8 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -665,14 +665,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_size(const H5F_t H5_ATTR_SANITY_CHECK *f, const H5FS_t *fspace, hsize_t *meta_size)
+H5FS_size(const H5FS_t *fspace, hsize_t *meta_size)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
/*
* Check arguments.
*/
- HDassert(f);
HDassert(fspace);
HDassert(meta_size);
diff --git a/src/H5FScache.c b/src/H5FScache.c
index c2895e2..d5f2817 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -241,7 +241,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5FS_t *fspace = NULL; /* Free space header info */
@@ -404,8 +404,8 @@ H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len)
*/
static herr_t
H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing,
- haddr_t addr, size_t H5_ATTR_UNUSED len, haddr_t H5_ATTR_SANITY_CHECK *new_addr,
- size_t H5_ATTR_SANITY_CHECK *new_len, unsigned *flags)
+ haddr_t addr, size_t H5_ATTR_UNUSED len, haddr_t H5_ATTR_NDEBUG_UNUSED *new_addr,
+ size_t H5_ATTR_NDEBUG_UNUSED *new_len, unsigned *flags)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
@@ -694,7 +694,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
@@ -979,8 +979,8 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static void *
-H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
- hbool_t H5_ATTR_SANITY_CHECK *dirty)
+H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
+ hbool_t H5_ATTR_NDEBUG_UNUSED *dirty)
{
H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */
H5FS_t *fspace; /* free space manager */
@@ -1026,9 +1026,9 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK le
/* Check for any serialized sections */
if(fspace->serial_sect_count > 0) {
hsize_t old_tot_sect_count; /* Total section count from header */
- hsize_t H5_ATTR_SANITY_CHECK old_serial_sect_count; /* Total serializable section count from header */
- hsize_t H5_ATTR_SANITY_CHECK old_ghost_sect_count; /* Total ghost section count from header */
- hsize_t H5_ATTR_SANITY_CHECK old_tot_space; /* Total space managed from header */
+ hsize_t H5_ATTR_NDEBUG_UNUSED old_serial_sect_count; /* Total serializable section count from header */
+ hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */
+ hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */
unsigned sect_cnt_size; /* The size of the section size counts */
/* Compute the size of the section counts */
@@ -1178,7 +1178,7 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
*/
static herr_t
H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr,
- size_t H5_ATTR_SANITY_CHECK len, haddr_t *new_addr, size_t H5_ATTR_SANITY_CHECK *new_len,
+ size_t H5_ATTR_NDEBUG_UNUSED len, haddr_t *new_addr, size_t H5_ATTR_NDEBUG_UNUSED *new_len,
unsigned *flags)
{
H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index 31fc63c..d2e1f90 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -182,7 +182,7 @@ H5_DLL H5FS_t *H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_c
H5_DLL H5FS_t *H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses,
const H5FS_section_class_t *classes[], void *cls_init_udata, hsize_t alignment,
hsize_t threshold);
-H5_DLL herr_t H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size);
+H5_DLL herr_t H5FS_size(const H5FS_t *fspace, hsize_t *meta_size);
H5_DLL herr_t H5FS_delete(H5F_t *f, haddr_t fs_addr);
H5_DLL herr_t H5FS_close(H5F_t *f, H5FS_t *fspace);
H5_DLL herr_t H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr);
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index f17ef15..f95f13d 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -344,7 +344,7 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -434,7 +434,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5F_super_t *sblock = NULL; /* File's superblock */
@@ -867,7 +867,7 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -911,7 +911,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
@@ -1006,7 +1006,7 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 83c1f0c..35b90f3 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -762,7 +762,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_SANITY_CHECK *_lt_key/*in,out*/,
+H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key/*in,out*/,
hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/,
void *_udata/*in,out*/, void *_rt_key/*in,out*/,
hbool_t *rt_key_changed/*out*/)
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 1d76ba3..4a2ff91 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -403,7 +403,7 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
H5HF_hdr_t hdr; /* Temporary fractal heap header */
@@ -749,7 +749,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */
@@ -979,7 +979,7 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static void *
-H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
@@ -1326,7 +1326,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
@@ -1471,8 +1471,8 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing)
else {
/* if this is a child iblock, verify that the pointers are */
/* either uninitialized or set up correctly. */
- H5HF_indirect_t H5_ATTR_SANITY_CHECK *par_iblock = iblock->parent;
- unsigned H5_ATTR_SANITY_CHECK indir_idx; /* Index in parent's child iblock pointer array */
+ H5HF_indirect_t H5_ATTR_NDEBUG_UNUSED *par_iblock = iblock->parent;
+ unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
@@ -2438,8 +2438,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image,
- size_t H5_ATTR_SANITY_CHECK len, void *_thing)
+H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
+ size_t H5_ATTR_NDEBUG_UNUSED len, void *_thing)
{
H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 1514c53..c11bc34 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -1185,9 +1185,9 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
H5HF_indirect_t *iblock; /* Indirect block that section's direct block resides in */
haddr_t dblock_addr; /* Direct block address */
size_t dblock_size; /* Direct block size */
- size_t H5_ATTR_SANITY_CHECK dblock_overhead; /* Direct block's overhead */
unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
- herr_t H5_ATTR_SANITY_CHECK status; /* Generic status value */
+ size_t H5_ATTR_NDEBUG_UNUSED dblock_overhead; /* Direct block's overhead */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Generic status value */
/* Sanity check settings for section's direct block's parent */
iblock = sect->u.single.parent;
@@ -2038,7 +2038,7 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
const H5HF_hdr_t *hdr; /* Fractal heap header */
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */
- unsigned H5_ATTR_SANITY_CHECK indir_idx; /* Index of row in underlying indirect section's row array */
+ unsigned H5_ATTR_NDEBUG_UNUSED indir_idx; /* Index of row in underlying indirect section's row array */
FUNC_ENTER_STATIC_NOERR
@@ -4125,7 +4125,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
dir_nrows = (max_dir_row - start_row) + 1;
HDassert(dir_nrows == sect->u.indirect.dir_nrows);
for(u = 0; u < dir_nrows; u++) {
- const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_row_sect; /* Pointer to row section */
+ const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect; /* Pointer to row section */
tmp_row_sect = sect->u.indirect.dir_rows[u];
HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW
@@ -4133,7 +4133,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
HDassert(tmp_row_sect->u.row.under == sect);
HDassert(tmp_row_sect->u.row.row == (start_row + u));
if(u > 0) {
- const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_row_sect2; /* Pointer to row section */
+ const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_row_sect2; /* Pointer to row section */
tmp_row_sect2 = sect->u.indirect.dir_rows[u - 1];
HDassert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row);
@@ -4160,7 +4160,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
HDassert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT);
HDassert(tmp_child_sect->u.indirect.parent == sect);
if(u > 0) {
- const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_child_sect2; /* Pointer to child indirect section */
+ const H5HF_free_section_t H5_ATTR_NDEBUG_UNUSED *tmp_child_sect2; /* Pointer to child indirect section */
tmp_child_sect2 = sect->u.indirect.indir_ents[u - 1];
HDassert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr));
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index 37a0502..ad5ff0f 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -447,7 +447,7 @@ H5HF__space_size(H5HF_hdr_t *hdr, hsize_t *fs_size)
/* Get free space metadata size */
if(hdr->fspace) {
- if(H5FS_size(hdr->f, hdr->fspace, fs_size) < 0)
+ if(H5FS_size(hdr->fspace, fs_size) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info")
} /* end if */
else
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index a2a9318..18625cc 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -202,7 +202,7 @@ H5HG__cache_heap_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *imag
*-------------------------------------------------------------------------
*/
static herr_t
-H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *udata, size_t *actual_len)
{
H5HG_heap_t heap; /* Global heap */
@@ -432,7 +432,7 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HG__cache_heap_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image, size_t len,
+H5HG__cache_heap_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image, size_t len,
void *_thing)
{
H5HG_heap_t *heap = (H5HG_heap_t *)_thing;
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 966ef40..b0ac05f 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -364,7 +364,7 @@ H5HL__cache_prefix_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *im
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -415,7 +415,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5HL_t *heap = NULL; /* Local heap */
@@ -555,7 +555,7 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_prefix_serialize(const H5_ATTR_SANITY_CHECK H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */
@@ -826,8 +826,8 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image,
- size_t H5_ATTR_SANITY_CHECK len, void *_thing)
+H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *image,
+ size_t H5_ATTR_NDEBUG_UNUSED len, void *_thing)
{
H5HL_t *heap; /* Pointer to the local heap */
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
diff --git a/src/H5MF.c b/src/H5MF.c
index c100637..df1c88a 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -2290,7 +2290,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size)
/* Retrieve free space size from free space manager */
if(H5FS_sect_stats(f->shared->fs_man[type], &type_fs_size, NULL) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats")
- if(H5FS_size(f, f->shared->fs_man[type], &type_meta_size) < 0)
+ if(H5FS_size(f->shared->fs_man[type], &type_meta_size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space metadata stats")
/* Increment total free space for types */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index d8e13c5..2d95ee9 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -334,7 +334,7 @@ H5O__ainfo_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_SANITY_CHECK *open_oh, void *_mesg)
+H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg)
{
H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */
@@ -405,9 +405,9 @@ H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
*-------------------------------------------------------------------------
*/
static void *
-H5O__ainfo_copy_file(H5F_t H5_ATTR_SANITY_CHECK *file_src, void *mesg_src, H5F_t *file_dst,
+H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags,
- H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info, void H5_ATTR_UNUSED *udata)
+ H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src;
H5O_ainfo_t *ainfo_dst = NULL;
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 698fc19..8850ef6 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -111,7 +111,7 @@ H5FL_EXTERN(H5O_cont_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__add_gap(H5F_t H5_ATTR_SANITY_CHECK *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
+H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
size_t idx, uint8_t *new_gap_loc, size_t new_gap_size)
{
hbool_t merged_with_null; /* Whether the gap was merged with a null message */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index a977594..8bad181 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -201,7 +201,7 @@ H5O__cache_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len,
+H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_NDEBUG_UNUSED image_len,
void *_udata, size_t *actual_len)
{
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
@@ -306,7 +306,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5O__cache_deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t *dirty)
{
H5O_t *oh = NULL; /* Object header read in */
@@ -763,7 +763,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_chk_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+H5O__cache_chk_deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *_udata,
hbool_t *dirty)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index b835f8e..f53eb4a 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -383,7 +383,8 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src,
H5F_addr_encode(dst_oloc->file, &p, dst_oloc->addr);
if(H5R__set_obj_token(ref, (const H5VL_token_t *)&tmp_token, token_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set object token")
- if(H5R__set_loc_id(ref, dst_loc_id, TRUE) < 0)
+ /* Do not set app_ref since references are released once the copy is done */
+ if(H5R__set_loc_id(ref, dst_loc_id, TRUE, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set destination loc id")
} /* end for */
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 1623769..d66ea69 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1686,7 +1686,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_reset_share(unsigned H5_ATTR_SANITY_CHECK type_id, void *mesg)
+H5O_msg_reset_share(unsigned H5_ATTR_NDEBUG_UNUSED type_id, void *mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 3798cdf..b49e501 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -589,9 +589,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O__shared_copy_file(H5F_t H5_ATTR_SANITY_CHECK *file_src, H5F_t *file_dst,
+H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst,
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
- hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info,
+ hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info,
void H5_ATTR_UNUSED *udata)
{
const H5O_shared_t *shared_src = (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index f0fced4..e4ad980 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -381,7 +381,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5_INLINE herr_t
-H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_SANITY_CHECK *oloc_src, const void *mesg_src,
+H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const void *mesg_src,
H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags,
H5O_copy_t *cpy_info)
{
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index c046bba..3668229 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -5755,7 +5755,7 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
const H5VL_connector_prop_t *info2 = (const H5VL_connector_prop_t *)_info2;
H5VL_class_t *cls1, *cls2; /* connector class for each property */
int cmp_value = 0; /* Value from comparison */
- herr_t H5_ATTR_SANITY_CHECK status; /* Status from info comparison */
+ herr_t H5_ATTR_NDEBUG_UNUSED status; /* Status from info comparison */
int ret_value = 0; /* Return value */
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Pint.c b/src/H5Pint.c
index c3c6f62..0810427 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -2780,7 +2780,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name,
+H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDEBUG_UNUSED *name,
H5P_genprop_t *prop, void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
@@ -2827,7 +2827,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_SANITY_CHECK *name, H5P_genprop_t *prop,
+H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *name, H5P_genprop_t *prop,
void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
@@ -4260,7 +4260,7 @@ property list class.
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5P__iterate_pclass_cb(void *_item, void H5_ATTR_SANITY_CHECK *_key, void *_udata)
+H5P__iterate_pclass_cb(void *_item, void H5_ATTR_NDEBUG_UNUSED *_key, void *_udata)
{
H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */
H5P_iter_pclass_ud_t *udata = (H5P_iter_pclass_ud_t *)_udata; /* Pointer to user data */
@@ -4396,7 +4396,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__peek_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name,
+H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDEBUG_UNUSED *name,
H5P_genprop_t *prop, void *_udata)
{
H5P_prop_get_ud_t *udata = (H5P_prop_get_ud_t *)_udata; /* User data for callback */
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 6e79e35..6e582fb 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -567,7 +567,7 @@ H5P__lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t H5_ATTR_
if(obj1 == NULL && obj2 != NULL) HGOTO_DONE(1);
if(obj1 != NULL && obj2 == NULL) HGOTO_DONE(-1);
if(obj1 && obj2) {
- herr_t H5_ATTR_SANITY_CHECK status;
+ herr_t H5_ATTR_NDEBUG_UNUSED status;
status = H5P__cmp_plist(obj1, obj2, &ret_value);
HDassert(status >= 0);
diff --git a/src/H5R.c b/src/H5R.c
index f5d119f..3a022eb 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -139,7 +139,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
@@ -232,7 +232,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
@@ -321,7 +321,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 46e4c0c..cef1f0a 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -433,8 +433,15 @@ H5R__destroy(H5R_ref_priv_t *ref)
} /* end switch */
/* Decrement refcount of attached loc_id */
- if(ref->type && (ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ if(ref->type && (ref->loc_id != H5I_INVALID_HID)) {
+ if(ref->app_ref) {
+ if(H5I_dec_app_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ } else {
+ if(H5I_dec_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ }
+ }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -451,7 +458,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref)
+H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -460,14 +467,26 @@ H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref)
HDassert(ref != NULL);
HDassert(id != H5I_INVALID_HID);
- /* If a location ID was previously assigned, decrement refcount and assign new one */
- if((ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ /* If a location ID was previously assigned, decrement refcount and
+ * assign new one */
+ if((ref->loc_id != H5I_INVALID_HID)) {
+ if(ref->app_ref) {
+ if(H5I_dec_app_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ } else {
+ if(H5I_dec_ref(ref->loc_id) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
+ }
+ }
ref->loc_id = id;
- /* Prevent location ID from being freed until reference is destroyed */
- if(inc_ref && H5I_inc_ref(ref->loc_id, FALSE) < 0)
+ /* Prevent location ID from being freed until reference is destroyed,
+ * set app_ref if necessary as references are exposed to users and are
+ * expected to be destroyed, this allows the loc_id to be cleanly released
+ * on shutdown if users fail to call H5Rdestroy(). */
+ if(inc_ref && H5I_inc_ref(ref->loc_id, app_ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed")
+ ref->app_ref = app_ref;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -559,7 +578,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5I_INVALID_HID, "unable to make file 'post open' callback")
/* Attach loc_id to reference */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference")
done:
@@ -711,7 +730,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
dst_ref->ref.obj.filename = NULL;
/* Set location ID and hold reference to it */
- if(H5R__set_loc_id(dst_ref, src_ref->loc_id, TRUE) < 0)
+ if(H5R__set_loc_id(dst_ref, src_ref->loc_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "cannot set reference location ID")
}
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index 7471487..4dbc656 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -79,7 +79,7 @@ typedef struct H5R_ref_priv_t {
uint32_t encode_size; /* Cached encoding size */
int8_t type; /* Reference type */
uint8_t token_size; /* Cached token size */
- char unused[18]; /* Unused */
+ hbool_t app_ref; /* App ref on loc_id */
} H5R_ref_priv_t;
/*****************************/
@@ -95,7 +95,7 @@ H5_DLL herr_t H5R__create_region(const H5VL_token_t *obj_token, size_t token_s
H5_DLL herr_t H5R__create_attr(const H5VL_token_t *obj_token, size_t token_size, const char *attr_name, H5R_ref_priv_t *ref);
H5_DLL herr_t H5R__destroy(H5R_ref_priv_t *ref);
-H5_DLL herr_t H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref);
+H5_DLL herr_t H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref);
H5_DLL hid_t H5R__get_loc_id(const H5R_ref_priv_t *ref);
H5_DLL hid_t H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id);
diff --git a/src/H5SL.c b/src/H5SL.c
index 7ca70b3..ff8edb8 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -652,7 +652,7 @@ int H5SL_term_package(void)
/* Terminate all the factories */
if(H5SL_fac_nused_g > 0) {
size_t i;
- herr_t H5_ATTR_SANITY_CHECK ret;
+ herr_t H5_ATTR_NDEBUG_UNUSED ret;
for(i = 0; i < H5SL_fac_nused_g; i++) {
ret = H5FL_fac_term(H5SL_fac_g[i]);
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 1d5cd03..6d0f2b0 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -212,7 +212,7 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU
*-------------------------------------------------------------------------
*/
static void *
-H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5F_t *f; /* File pointer -- from user data */
@@ -364,7 +364,7 @@ H5SM__cache_table_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to encode */
@@ -568,7 +568,7 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
*-------------------------------------------------------------------------
*/
static void *
-H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5SM_list_t *list = NULL; /* The SOHM list being read in */
@@ -687,7 +687,7 @@ H5SM__cache_list_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
+H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UNUSED len,
void *_thing)
{
H5SM_list_t *list = (H5SM_list_t *)_thing ; /* Instance being serialized */
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index c316cad..29fd582 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -1848,7 +1848,7 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
for(i = 0; i < priv->src_nmembs; i++)
if(src2dst[i] >= 0) {
- int H5_ATTR_SANITY_CHECK status;
+ int H5_ATTR_NDEBUG_UNUSED status;
status = H5I_dec_ref(src_memb_id[i]);
HDassert(status >= 0);
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 9205ed1..78966cf 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -622,8 +622,9 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size
if((file_id = H5F_get_file_id(src_file, H5I_FILE, FALSE)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
- /* Attach loc ID to reference and hold reference to it */
- if(H5R__set_loc_id(dst_ref, file_id, TRUE) < 0)
+ /* Attach loc ID to reference and hold reference to it, this is a
+ * user exposed reference so set app_ref to TRUE. */
+ if(H5R__set_loc_id(dst_ref, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
} /* end if */
@@ -783,7 +784,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_SANITY_CHECK src_size,
+H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_NDEBUG_UNUSED src_size,
H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, size_t dst_size)
{
const uint8_t *p = (const uint8_t *)src_buf;
diff --git a/src/H5private.h b/src/H5private.h
index e853cf0..c3375df 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -305,20 +305,20 @@
*/
#ifdef __cplusplus
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
-# define H5_ATTR_UNUSED /*void*/
-# define H5_ATTR_SANITY_CHECK /*void*/
-# define H5_ATTR_NORETURN /*void*/
-# define H5_ATTR_CONST /*void*/
-# define H5_ATTR_PURE /*void*/
-# define H5_ATTR_FALLTHROUGH /*void*/
+# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_NDEBUG_UNUSED /*void*/
+# define H5_ATTR_NORETURN /*void*/
+# define H5_ATTR_CONST /*void*/
+# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#else /* __cplusplus */
#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z)))
# define H5_ATTR_UNUSED __attribute__((unused))
#ifndef NDEBUG
-#define H5_ATTR_SANITY_CHECK /*void*/
+#define H5_ATTR_NDEBUG_UNUSED /*void*/
#else /* NDEBUG */
-#define H5_ATTR_SANITY_CHECK H5_ATTR_UNUSED
+#define H5_ATTR_NDEBUG_UNUSED H5_ATTR_UNUSED
#endif /* NDEBUG */
# define H5_ATTR_NORETURN __attribute__((noreturn))
# define H5_ATTR_CONST __attribute__((const))
@@ -330,12 +330,12 @@
#endif
#else
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
-# define H5_ATTR_UNUSED /*void*/
-# define H5_ATTR_SANITY_CHECK /*void*/
-# define H5_ATTR_NORETURN /*void*/
-# define H5_ATTR_CONST /*void*/
-# define H5_ATTR_PURE /*void*/
-# define H5_ATTR_FALLTHROUGH /*void*/
+# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_NDEBUG_UNUSED /*void*/
+# define H5_ATTR_NORETURN /*void*/
+# define H5_ATTR_CONST /*void*/
+# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#endif
#endif /* __cplusplus */
@@ -2050,7 +2050,7 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_ENTER_COMMON(asrt) \
- hbool_t H5_ATTR_SANITY_CHECK err_occurred = FALSE; \
+ hbool_t err_occurred = FALSE; \
\
FUNC_ENTER_CHECK_NAME(asrt);