summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-13 19:20:19 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:51 (GMT)
commit27c618b91d6e6390d5fe987886372e7b9593b25f (patch)
tree84a41f876f022a5fbf6d083d8cce9b2375320f23
parent8377789f8fb1195d9f5dc516f27d86e1aabfd297 (diff)
downloadhdf5-27c618b91d6e6390d5fe987886372e7b9593b25f.zip
hdf5-27c618b91d6e6390d5fe987886372e7b9593b25f.tar.gz
hdf5-27c618b91d6e6390d5fe987886372e7b9593b25f.tar.bz2
fix unused related warnings
-rw-r--r--src/H5ACmpio.c2
-rw-r--r--src/H5Aint.c2
-rw-r--r--src/H5B.c4
-rw-r--r--src/H5B2dbg.c6
-rw-r--r--src/H5B2internal.c4
-rw-r--r--src/H5C.c10
-rw-r--r--src/H5CX.c4
-rw-r--r--src/H5Clog_json.c2
-rw-r--r--src/H5Dbtree.c4
-rw-r--r--src/H5Dint.c2
-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/H5FDhdfs.c3
-rw-r--r--src/H5FS.c2
-rw-r--r--src/H5FScache.c53
-rw-r--r--src/H5Fsuper_cache.c10
-rw-r--r--src/H5Gnode.c5
-rw-r--r--src/H5HFcache.c18
-rw-r--r--src/H5HFsection.c12
-rw-r--r--src/H5HGcache.c4
-rw-r--r--src/H5HLcache.c12
-rw-r--r--src/H5I.c2
-rw-r--r--src/H5Oainfo.c6
-rw-r--r--src/H5Oalloc.c2
-rw-r--r--src/H5Ocache.c6
-rw-r--r--src/H5Omessage.c9
-rw-r--r--src/H5Oshared.c4
-rw-r--r--src/H5Oshared.h2
-rw-r--r--src/H5Pfapl.c8
-rw-r--r--src/H5Pint.c15
-rw-r--r--src/H5Plapl.c2
-rw-r--r--src/H5SL.c2
-rw-r--r--src/H5SMcache.c12
-rw-r--r--src/H5Tconv.c2
-rw-r--r--src/H5Tref.c8
-rw-r--r--src/H5mpi.c2
-rw-r--r--src/H5private.h9
-rw-r--r--test/cache_common.c67
-rw-r--r--test/cache_image.c2
-rw-r--r--test/cache_tagging.c50
-rw-r--r--test/dsets.c8
-rw-r--r--test/dtypes.c2
-rw-r--r--test/mf.c4
-rw-r--r--test/page_buffer.c6
-rw-r--r--test/tfile.c4
-rw-r--r--test/tmisc.c10
-rw-r--r--test/tselect.c3
-rw-r--r--test/vds_swmr.h10
-rw-r--r--testpar/t_cache.c14
-rw-r--r--testpar/t_filter_read.c3
-rw-r--r--testpar/t_mdset.c3
-rw-r--r--testpar/t_span_tree.c10
-rw-r--r--tools/lib/h5tools_dump.c2
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/src/h5diff/ph5diff_main.c2
-rw-r--r--tools/test/h5diff/h5diffgentest.c36
-rw-r--r--tools/test/h5dump/h5dumpgentest.c234
-rw-r--r--tools/test/h5repack/h5repacktst.c16
-rw-r--r--tools/test/perform/iopipe.c38
62 files changed, 401 insertions, 395 deletions
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index e4b81fa..56fedee 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 *aux_ptr,
+H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_SANITY_CHECK *aux_ptr,
int sync_point_op)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 90fb5c8..f8d7edc 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 *cpy_info)
+ H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info)
{
H5A_t *attr_dst = NULL; /* Destination attribute */
hid_t tid_src = -1; /* Datatype ID for source datatype */
diff --git a/src/H5B.c b/src/H5B.c
index 2a34fae..4c1abfd 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -2020,7 +2020,6 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
{
H5B_t *bt = NULL; /* The B-tree */
H5UC_t *rc_shared; /* Ref-counted shared info */
- H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
htri_t ret_value = SUCCEED; /* Return value */
@@ -2038,8 +2037,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr)
/* Get shared info for B-tree */
if(NULL == (rc_shared = (type->get_shared)(f, NULL)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
- shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared);
- HDassert(shared);
+ HDassert((H5B_shared_t *)H5UC_GET_OBJ(rc_shared));
/*
* Load the tree node.
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 0e3ebd5..dcae07c 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 *type, haddr_t obj_addr)
+ const H5B2_class_t H5_ATTR_SANITY_CHECK *type, haddr_t H5_ATTR_SANITY_CHECK 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 obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_SANITY_CHECK 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 obj_addr)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_SANITY_CHECK 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 7f6b80a..f08237e 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 *hdr, const H5B2_internal_t *internal)
+H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_SANITY_CHECK *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 *hdr, const H5B2
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE herr_t
-H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2)
+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)
{
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/H5C.c b/src/H5C.c
index 3a236d3..9c40f4d 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1456,7 +1456,6 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
H5C_ring_t ring;
H5C_t * cache_ptr;
hbool_t destroy;
- hbool_t ignore_protected;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1501,9 +1500,8 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
- ignore_protected = ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 );
destroy = ( (flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 );
- HDassert( ! ( destroy && ignore_protected ) );
+ HDassert( ! ( destroy && ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 )) );
HDassert( ! ( cache_ptr->flush_in_progress ) );
cache_ptr->flush_in_progress = TRUE;
@@ -4440,7 +4438,11 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
+#if H5C_DO_SANITY_CHECKS
FUNC_ENTER_STATIC
+#else
+ FUNC_ENTER_STATIC_NOERR
+#endif
/* Sanity checking */
HDassert(cache_ptr);
@@ -4457,7 +4459,9 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr,
/* Update the stats for an unpin operation */
H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
+#if H5C_DO_SANITY_CHECKS
done:
+#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__unpin_entry_real() */
diff --git a/src/H5CX.c b/src/H5CX.c
index 649bd8f..998808b 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -105,7 +105,7 @@
} /* end if */
#endif /* H5_HAVE_PARALLEL */
-#ifdef H5_HAVE_PARALLEL
+#if defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_INSTRUMENTED_LIBRARY)
/* Macro for the duplicated code to test and set properties for a property list */
#define H5CX_TEST_SET_PROP(PROP_NAME, PROP_FIELD) \
{ \
@@ -127,7 +127,9 @@
(*head)->ctx.H5_GLUE(PROP_FIELD,_set) = TRUE; \
} /* end if */ \
}
+#endif
+#ifdef H5_HAVE_PARALLEL
/* Macro for the duplicated code to test and set properties for a property list */
#define H5CX_SET_PROP(PROP_NAME, PROP_FIELD) \
if((*head)->ctx.H5_GLUE(PROP_FIELD,_set)) { \
diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c
index dd9e9b2..38aedf9 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 *config,
+H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t H5_ATTR_SANITY_CHECK *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 c13c36a..aea4672 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 *f, H5B_ins_t op, void *_lt_key, void *_udata,
+H5D__btree_new_node(H5F_t H5_ATTR_SANITY_CHECK *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 *f, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed,
+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,
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 413a6e1..0e9535a 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -737,7 +737,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__use_minimized_dset_headers(H5F_t *file, H5D_t *dset, hbool_t *minimize)
+H5D__use_minimized_dset_headers(H5F_t *file, H5D_t H5_ATTR_SANITY_CHECK *dset, hbool_t *minimize)
{
herr_t ret_value = SUCCEED;
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 9346220..eb4e6b8 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 *idx_info_src,
+H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *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 4510a03..3d7400d 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 *idx_info_src,
+H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *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 f485ce1..983b618 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -1548,7 +1548,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 len,
+H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -2085,7 +2085,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 *f, void *_image, size_t H5_ATTR_UNUSED len,
+H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len,
void *_thing))
/* Local variables */
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 814e64f..6b47828 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 *_ctx))
+H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_SANITY_CHECK *_ctx))
/* Local variables */
#ifndef NDEBUG
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index e715b1e..9fc061d 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -256,7 +256,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 len,
+H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -654,7 +654,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 len,
+H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_udata, hbool_t H5_ATTR_UNUSED *dirty))
/* Local variables */
@@ -1181,7 +1181,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 *f, void *_image, size_t H5_ATTR_UNUSED len,
+H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len,
void *_thing))
/* Local variables */
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index e793151..3d086ea 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -577,6 +577,9 @@ hid_t
H5FD_hdfs_init(void)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
+#if HDFS_STATS
+ unsigned int bin_i;
+#endif
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5FS.c b/src/H5FS.c
index dbcb6b5..bd89bed 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -665,7 +665,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size)
+H5FS_size(const H5F_t H5_ATTR_SANITY_CHECK *f, const H5FS_t *fspace, hsize_t *meta_size)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 21f53da..c557758 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -243,7 +243,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 len, void *_udata,
+H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5FS_t *fspace = NULL; /* Free space header info */
@@ -406,8 +406,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 *new_addr, size_t *new_len,
- unsigned *flags)
+ 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)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
@@ -696,7 +696,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len,
+H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_thing)
{
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
@@ -981,8 +981,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 len, void *_udata,
- hbool_t *dirty)
+H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
+ hbool_t H5_ATTR_SANITY_CHECK *dirty)
{
H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */
H5FS_t *fspace; /* free space manager */
@@ -1027,11 +1027,11 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t len, void *_udata,
/* Check for any serialized sections */
if(fspace->serial_sect_count > 0) {
- hsize_t old_tot_sect_count; /* Total section count from header */
- hsize_t old_serial_sect_count; /* Total serializable section count from header */
- hsize_t old_ghost_sect_count; /* Total ghost section count from header */
- hsize_t old_tot_space; /* Total space managed from header */
- unsigned sect_cnt_size; /* The size of the section size counts */
+ 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 */
+ unsigned sect_cnt_size; /* The size of the section size counts */
/* Compute the size of the section counts */
sect_cnt_size = H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count);
@@ -1143,7 +1143,6 @@ static herr_t
H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
{
const H5FS_sinfo_t *sinfo = (const H5FS_sinfo_t *)_thing; /* Pointer to the object */
- const H5FS_t *fspace; /* Free space header */
FUNC_ENTER_STATIC_NOERR
@@ -1151,10 +1150,9 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len)
HDassert(sinfo);
HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- fspace = sinfo->fspace;
- HDassert(fspace);
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
+ HDassert(sinfo->fspace);
+ HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
HDassert(image_len);
/* Set the image length size */
@@ -1182,7 +1180,8 @@ 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 len, haddr_t *new_addr, size_t *new_len, unsigned *flags)
+ size_t H5_ATTR_SANITY_CHECK len, haddr_t *new_addr, size_t H5_ATTR_SANITY_CHECK *new_len,
+ unsigned *flags)
{
H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */
H5FS_t *fspace; /* Free space header */
@@ -1269,7 +1268,6 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len,
void *_thing)
{
H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */
- H5FS_t *fspace; /* Free space header */
H5FS_iter_ud_t udata; /* User data for callbacks */
uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */
uint8_t *chksum_image = NULL; /* Points to chksum location */
@@ -1285,12 +1283,11 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len,
HDassert(sinfo);
HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- fspace = sinfo->fspace;
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(fspace->cache_info.is_pinned);
- HDassert(fspace->sect_size == len);
- HDassert(fspace->sect_cls);
+ HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ HDassert(sinfo->fspace->cache_info.is_pinned);
+ HDassert(sinfo->fspace->sect_size == len);
+ HDassert(sinfo->fspace->sect_cls);
/* Magic number */
H5MM_memcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -1420,7 +1417,6 @@ static herr_t
H5FS__cache_sinfo_free_icr(void *_thing)
{
H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */
- H5FS_t *fspace; /* Free space header */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1429,10 +1425,9 @@ H5FS__cache_sinfo_free_icr(void *_thing)
HDassert(sinfo);
HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC);
HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO);
- fspace = sinfo->fspace;
- HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR);
- HDassert(fspace->cache_info.is_pinned);
+ HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR);
+ HDassert(sinfo->fspace->cache_info.is_pinned);
/* Destroy free space info */
if(H5FS__sinfo_dest(sinfo) < 0)
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index cf22ba7..3c09664 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -348,7 +348,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 image_len,
+H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -438,7 +438,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 len, void *_udata,
+H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5F_super_t *sblock = NULL; /* File's superblock */
@@ -871,7 +871,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 image_len,
+H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -915,7 +915,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata,
+H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
hbool_t H5_ATTR_UNUSED *dirty)
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
@@ -1010,7 +1010,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 len,
+H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK 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 d11d7a0..83c1f0c 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -762,12 +762,11 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/,
+H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_SANITY_CHECK *_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*/)
{
- H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key;
H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key;
H5G_bt_rm_t *udata = (H5G_bt_rm_t *)_udata;
H5G_node_t *sn = NULL;
@@ -781,7 +780,7 @@ H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/,
/* Check arguments */
HDassert(f);
HDassert(H5F_addr_defined(addr));
- HDassert(lt_key);
+ HDassert((H5G_node_key_t *)_lt_key);
HDassert(rt_key);
HDassert(udata && udata->common.heap);
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index be41c6b..3147e00 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -406,7 +406,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 image_len,
+H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
void *_udata, size_t *actual_len)
{
H5HF_hdr_t hdr; /* Temporary fractal heap header */
@@ -752,7 +752,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len,
+H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_thing)
{
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */
@@ -982,8 +982,8 @@ 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 len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+ void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* User data for callback */
@@ -1329,7 +1329,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t len,
+H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_thing)
{
H5HF_hdr_t *hdr; /* Shared fractal heap information */
@@ -1474,8 +1474,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 *par_iblock = iblock->parent;
- unsigned indir_idx; /* Index in parent's child iblock pointer array */
+ 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 */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
@@ -2441,8 +2441,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF__cache_dblock_serialize(const H5F_t *f, void *image, size_t len,
- void *_thing)
+H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image,
+ size_t H5_ATTR_SANITY_CHECK 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 f5ac8e5..1514c53 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 dblock_overhead; /* Direct block's overhead */
+ 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 status; /* Generic status value */
+ herr_t H5_ATTR_SANITY_CHECK 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 indir_idx; /* Index of row in underlying indirect section's row array */
+ unsigned H5_ATTR_SANITY_CHECK 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 *tmp_row_sect; /* Pointer to row section */
+ const H5HF_free_section_t H5_ATTR_SANITY_CHECK *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 *tmp_row_sect2; /* Pointer to row section */
+ const H5HF_free_section_t H5_ATTR_SANITY_CHECK *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 *tmp_child_sect2; /* Pointer to child indirect section */
+ const H5HF_free_section_t H5_ATTR_SANITY_CHECK *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/H5HGcache.c b/src/H5HGcache.c
index ac294ba..b6d6a0b 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -203,7 +203,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 image_len,
+H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len,
void *udata, size_t *actual_len)
{
H5HG_heap_t heap; /* Global heap */
@@ -433,7 +433,7 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HG__cache_heap_serialize(const H5F_t *f, void *image, size_t len,
+H5HG__cache_heap_serialize(const H5F_t H5_ATTR_SANITY_CHECK *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 5018999..41566c9 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -366,7 +366,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 image_len,
+H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len,
void *_udata, size_t *actual_len)
{
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
@@ -417,8 +417,8 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+ void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5HL_t *heap = NULL; /* Local heap */
H5HL_prfx_t *prfx = NULL; /* Heap prefix deserialized */
@@ -557,7 +557,7 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len,
+H5HL__cache_prefix_serialize(const H5_ATTR_SANITY_CHECK H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_thing)
{
H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */
@@ -828,8 +828,8 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL__cache_datablock_serialize(const H5F_t *f, void *image, size_t len,
- void *_thing)
+H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image,
+ size_t H5_ATTR_SANITY_CHECK 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/H5I.c b/src/H5I.c
index 2ba8a2a..d1e9613 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -215,7 +215,7 @@ H5I_term_package(void)
*-------------------------------------------------------------------------
*/
H5I_type_t
-H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func)
+H5Iregister_type(size_t H5_ATTR_SANITY_CHECK hash_size, unsigned reserved, H5I_free_t free_func)
{
H5I_class_t *cls = NULL; /* New ID class */
H5I_type_t new_type; /* New ID type value */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 23aba09..d8e13c5 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 *open_oh, void *_mesg)
+H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_SANITY_CHECK *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 *file_src, void *mesg_src, H5F_t *file_dst,
+H5O__ainfo_copy_file(H5F_t H5_ATTR_SANITY_CHECK *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 *cpy_info, void H5_ATTR_UNUSED *udata)
+ H5O_copy_t H5_ATTR_SANITY_CHECK *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 c1f90cb..698fc19 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 *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied,
+H5O__add_gap(H5F_t H5_ATTR_SANITY_CHECK *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 cfe2d10..d8926d6 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -203,7 +203,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 image_len,
+H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len,
void *_udata, size_t *actual_len)
{
H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */
@@ -308,7 +308,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
*-------------------------------------------------------------------------
*/
static void *
-H5O__cache_deserialize(const void *image, size_t len, void *_udata,
+H5O__cache_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
hbool_t *dirty)
{
H5O_t *oh = NULL; /* Object header read in */
@@ -765,7 +765,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 len, void *_udata,
+H5O__cache_chk_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata,
hbool_t *dirty)
{
H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 18f3706..1623769 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1686,17 +1686,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_msg_reset_share(unsigned type_id, void *mesg)
+H5O_msg_reset_share(unsigned H5_ATTR_SANITY_CHECK type_id, void *mesg)
{
- const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
-
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(type_id < NELMTS(H5O_msg_class_g));
- type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */
- HDassert(type);
- HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE);
+ HDassert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */
+ HDassert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE);
HDassert(mesg);
/* Reset the shared component in the message to zero. */
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 67ca76f..3798cdf 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -589,9 +589,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O__shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
+H5O__shared_copy_file(H5F_t H5_ATTR_SANITY_CHECK *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 *cpy_info,
+ hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t H5_ATTR_SANITY_CHECK *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 8040a6a..f0fced4 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 *oloc_src, const void *mesg_src,
+H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_SANITY_CHECK *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 f28a381..369eb26 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -5981,10 +5981,10 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED
{
const H5VL_connector_prop_t *info1 = (const H5VL_connector_prop_t *)_info1; /* Create local aliases for values */
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 status; /* Status from info comparison */
- int ret_value = 0; /* Return value */
+ 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 */
+ int ret_value = 0; /* Return value */
FUNC_ENTER_STATIC_NOERR
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 2911eef..c3c6f62 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -2780,8 +2780,8 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
- void *_udata)
+H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name,
+ H5P_genprop_t *prop, void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2827,7 +2827,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
+H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_SANITY_CHECK *name, H5P_genprop_t *prop,
void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
@@ -4260,10 +4260,9 @@ property list class.
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5P__iterate_pclass_cb(void *_item, void *_key, void *_udata)
+H5P__iterate_pclass_cb(void *_item, void H5_ATTR_SANITY_CHECK *_key, void *_udata)
{
H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */
- char *key = (char *)_key; /* Pointer to the property's name */
H5P_iter_pclass_ud_t *udata = (H5P_iter_pclass_ud_t *)_udata; /* Pointer to user data */
int ret_value = 0; /* Return value */
@@ -4271,7 +4270,7 @@ H5P__iterate_pclass_cb(void *_item, void *_key, void *_udata)
/* Sanity check */
HDassert(item);
- HDassert(key);
+ HDassert((char *)_key);
/* Check if we've found the correctly indexed property */
if(*udata->curr_idx_ptr >= udata->prev_idx) {
@@ -4397,8 +4396,8 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__peek_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
- void *_udata)
+H5P__peek_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name,
+ H5P_genprop_t *prop, void *_udata)
{
H5P_prop_get_ud_t *udata = (H5P_prop_get_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index d899fa9..6e79e35 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 status;
+ herr_t H5_ATTR_SANITY_CHECK status;
status = H5P__cmp_plist(obj1, obj2, &ret_value);
HDassert(status >= 0);
diff --git a/src/H5SL.c b/src/H5SL.c
index 5f00fb8..7ca70b3 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 ret;
+ herr_t H5_ATTR_SANITY_CHECK 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 ee28fa4..1d5cd03 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -212,8 +212,8 @@ 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 len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+ void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5F_t *f; /* File pointer -- from user data */
H5SM_master_table_t *table = NULL; /* Shared message table that we deserializing */
@@ -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 len,
+H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len,
void *_thing)
{
H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to encode */
@@ -568,8 +568,8 @@ 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 len, void *_udata,
- hbool_t H5_ATTR_UNUSED *dirty)
+H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len,
+ void *_udata, hbool_t H5_ATTR_UNUSED *dirty)
{
H5SM_list_t *list = NULL; /* The SOHM list being read in */
H5SM_list_cache_ud_t *udata = (H5SM_list_cache_ud_t *)_udata; /* User data for callback */
@@ -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 len,
+H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK 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 8a0c562..c316cad 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 status;
+ int H5_ATTR_SANITY_CHECK status;
status = H5I_dec_ref(src_memb_id[i]);
HDassert(status >= 0);
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 83604c1..64e4ce9 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -784,7 +784,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_size,
+H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_SANITY_CHECK 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;
@@ -1101,7 +1101,11 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file,
{
size_t ret_value = sizeof(struct H5Tref_dsetreg);
+#ifndef NDEBUG
FUNC_ENTER_STATIC
+#else
+ FUNC_ENTER_STATIC_NOERR
+#endif
HDassert(src_buf);
@@ -1125,7 +1129,9 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file,
}
#endif /* NDEBUG */
+#ifndef NDEBUG
done:
+#endif
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__ref_dsetreg_disk_getsize() */
diff --git a/src/H5mpi.c b/src/H5mpi.c
index f529b3d..15451d4 100644
--- a/src/H5mpi.c
+++ b/src/H5mpi.c
@@ -75,7 +75,7 @@ H5_mpi_set_bigio_count(hsize_t new_count)
*-------------------------------------------------------------------------
*/
hsize_t
-H5_mpi_get_bigio_count()
+H5_mpi_get_bigio_count(void)
{
return bigio_count;
}
diff --git a/src/H5private.h b/src/H5private.h
index d8838f4..7b12501 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -306,6 +306,7 @@
#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*/
@@ -314,6 +315,11 @@
#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*/
+#else /* NDEBUG */
+#define H5_ATTR_SANITY_CHECK H5_ATTR_UNUSED
+#endif /* NDEBUG */
# define H5_ATTR_NORETURN __attribute__((noreturn))
# define H5_ATTR_CONST __attribute__((const))
# define H5_ATTR_PURE __attribute__((pure))
@@ -325,6 +331,7 @@
#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*/
@@ -2046,7 +2053,7 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_ENTER_COMMON(asrt) \
- hbool_t err_occurred = FALSE; \
+ hbool_t H5_ATTR_SANITY_CHECK err_occurred = FALSE; \
\
FUNC_ENTER_CHECK_NAME(asrt);
diff --git a/test/cache_common.c b/test/cache_common.c
index 1da875f..92c6e53 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -19,6 +19,7 @@
*/
#include "H5CXprivate.h" /* API Contexts */
#include "H5MMprivate.h"
+#include "H5private.h"
#include "cache_common.h"
@@ -564,7 +565,7 @@ addr_to_type_and_index(haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-get_initial_load_size(void *udata, size_t *image_length, int32_t entry_type)
+get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -674,7 +675,7 @@ notify_get_initial_load_size(void *udata, size_t *image_length)
*/
static herr_t
get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED image_len,
- void *udata, size_t *actual_len, int32_t entry_type)
+ void *udata, size_t *actual_len, int32_t H5_ATTR_SANITY_CHECK entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -734,7 +735,8 @@ variable_get_final_load_size(const void *image, size_t image_len,
*/
static htri_t
-verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata, int32_t entry_type)
+verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata,
+ int32_t H5_ATTR_SANITY_CHECK entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -787,8 +789,8 @@ variable_verify_chksum(const void *image, size_t len, void *udata)
*-------------------------------------------------------------------------
*/
static void *
-deserialize(const void *image, size_t len, void *udata, hbool_t *dirty,
- int32_t entry_type)
+deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *udata, hbool_t *dirty,
+ int32_t H5_ATTR_SANITY_CHECK entry_type)
{
test_entry_t *entry;
test_entry_t *base_addr;
@@ -944,12 +946,10 @@ notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty)
*-------------------------------------------------------------------------
*/
herr_t
-image_len(const void *thing, size_t *image_length, int32_t entry_type)
+image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type)
{
const test_entry_t *entry;
- test_entry_t *base_addr;
int32_t type;
- int32_t idx;
HDassert(thing);
HDassert(image_length);
@@ -959,14 +959,12 @@ image_len(const void *thing, size_t *image_length, int32_t entry_type)
HDassert(entry->self == entry);
type = entry->type;
- idx = entry->index;
HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
HDassert(type == entry_type);
- HDassert((idx >= 0) && (idx <= max_indices[type]));
+ HDassert((entry->index >= 0) && (entry->index <= max_indices[type]));
- base_addr = entries[type];
- HDassert(entry == &(base_addr[idx]));
+ HDassert(entry == &(entries[type][entry->index]));
if(type != VARIABLE_ENTRY_TYPE)
HDassert(entry->size == entry_sizes[type]);
@@ -1066,18 +1064,15 @@ notify_image_len(const void *thing, size_t *image_length)
*-------------------------------------------------------------------------
*/
herr_t
-pre_serialize(H5F_t *f,
+pre_serialize(H5F_t H5_ATTR_SANITY_CHECK *f,
void *thing,
- haddr_t addr,
- size_t len,
+ haddr_t H5_ATTR_SANITY_CHECK addr,
+ size_t H5_ATTR_SANITY_CHECK len,
haddr_t *new_addr_ptr,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
test_entry_t *entry;
- test_entry_t *base_addr;
- int32_t type;
- int32_t idx;
int32_t i;
HDassert(f);
@@ -1097,16 +1092,9 @@ pre_serialize(H5F_t *f,
/* shouldn't serialize the entry unless it is dirty */
HDassert(entry->is_dirty);
-
- type = entry->type;
- idx = entry->index;
-
- HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((idx >= 0) && (idx <= max_indices[type]));
-
- base_addr = entries[type];
-
- HDassert(entry == &(base_addr[idx]));
+ HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
+ HDassert((entry->index >= 0) && (entry->index <= max_indices[entry->type]));
+ HDassert(entry == &(entries[entry->type][entry->index]));
HDassert(entry->num_flush_ops >= 0);
HDassert(entry->num_flush_ops < MAX_FLUSH_OPS);
@@ -1318,9 +1306,7 @@ herr_t
serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing)
{
test_entry_t *entry;
- test_entry_t *base_addr;
int32_t type;
- int32_t idx;
HDassert(image_ptr);
HDassert(thing);
@@ -1334,14 +1320,11 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin
HDassert(entry->is_dirty);
type = entry->type;
- idx = entry->index;
HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES));
- HDassert((idx >= 0) && (idx <= max_indices[type]));
+ HDassert((entry->index >= 0) && (entry->index <= max_indices[type]));
- base_addr = entries[type];
-
- HDassert(entry == &(base_addr[idx]));
+ HDassert(entry == &(entries[type][entry->index]));
HDassert(entry->num_flush_ops >= 0);
HDassert(entry->num_flush_ops < MAX_FLUSH_OPS);
@@ -1472,21 +1455,19 @@ notify_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len,
*-------------------------------------------------------------------------
*/
static herr_t
-notify(H5C_notify_action_t action, void *thing, int32_t entry_type)
+notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_SANITY_CHECK entry_type)
{
test_entry_t *entry;
- test_entry_t *base_addr;
HDassert(thing);
entry = (test_entry_t *)thing;
- base_addr = entries[entry->type];
HDassert(entry->index >= 0);
HDassert(entry->index <= max_indices[entry->type]);
HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES));
HDassert(entry->type == entry_type);
- HDassert(entry == &(base_addr[entry->index]));
+ HDassert(entry == &(entries[entry->type][entry->index]));
HDassert(entry == entry->self);
if(!(action == H5C_NOTIFY_ACTION_ENTRY_DIRTIED && entry->action == TEST_ENTRY_ACTION_MOVE))
HDassert(entry->header.addr == entry->addr);
@@ -1551,18 +1532,14 @@ notify_notify(H5C_notify_action_t action, void *thing)
*-------------------------------------------------------------------------
*/
herr_t
-free_icr(test_entry_t *entry, int32_t entry_type)
+free_icr(test_entry_t *entry, int32_t H5_ATTR_SANITY_CHECK entry_type)
{
- test_entry_t *base_addr;
-
HDassert(entry);
- base_addr = entries[entry->type];
-
HDassert(entry->type == entry_type);
HDassert(entry->index >= 0);
HDassert(entry->index <= max_indices[entry->type]);
- HDassert(entry == &(base_addr[entry->index]));
+ HDassert(entry == &(entries[entry->type][entry->index]));
HDassert(entry == entry->self);
HDassert(entry->cache_ptr != NULL);
HDassert(entry->cache_ptr->magic == H5C__H5C_T_MAGIC);
diff --git a/test/cache_image.c b/test/cache_image.c
index 3a30ddc..d4002c7 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -7838,7 +7838,7 @@ get_free_sections_test(hbool_t single_file_vfd)
*-------------------------------------------------------------------------
*/
static unsigned
-evict_on_close_test()
+evict_on_close_test(hbool_t single_file_vfd)
{
#ifndef H5_HAVE_PARALLEL
const char * fcn_name = "evict_on_close_test()";
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 564e5bc..ddd63e4 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -443,7 +443,7 @@ check_file_creation_tags(hid_t fcpl_id, int type)
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose test outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -532,7 +532,7 @@ check_file_open_tags(hid_t fcpl, int type)
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag; /* Root Group Tag */
haddr_t sbe_tag; /* Sblock Extension Tag */
@@ -647,7 +647,7 @@ check_group_creation_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
haddr_t g_tag; /* Group Tag */
@@ -750,7 +750,7 @@ check_multi_group_creation_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
char gname[16]; /* group name buffer */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access prop list */
@@ -881,7 +881,7 @@ check_link_iteration_tags(void)
hid_t did = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
int i = 0; /* iterator */
haddr_t root_tag = 0; /* Root Group Tag Value */
char dsetname[500]; /* Name of dataset */
@@ -1003,7 +1003,7 @@ check_dense_attribute_tags(void)
hid_t dcpl = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
int i = 0; /* iterator */
hid_t fapl = -1; /* File access property list */
haddr_t d_tag = 0; /* Dataset tag value */
@@ -1187,7 +1187,7 @@ check_group_open_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1298,7 +1298,7 @@ check_attribute_creation_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
@@ -1434,7 +1434,7 @@ check_attribute_open_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
@@ -1573,7 +1573,7 @@ check_attribute_rename_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
int *data = NULL; /* data buffer */
int i,j,k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -1750,7 +1750,7 @@ check_attribute_delete_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
int *data = NULL; /* data buffer */
int i,j,k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -1918,7 +1918,7 @@ check_dataset_creation_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2053,7 +2053,7 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2192,7 +2192,7 @@ check_dataset_open_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2320,7 +2320,7 @@ check_dataset_write_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2464,7 +2464,7 @@ check_attribute_write_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
int *data = NULL; /* data buffer */
int i,j,k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -2619,7 +2619,7 @@ check_dataset_read_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2758,7 +2758,7 @@ check_dataset_size_retrieval(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -2899,7 +2899,7 @@ check_dataset_extend_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -3038,7 +3038,7 @@ check_object_info_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3152,7 +3152,7 @@ check_object_copy_tags(void)
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3275,7 +3275,7 @@ check_link_removal_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -3436,7 +3436,7 @@ check_link_getname_tags(void)
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1,1}; /* chunk dimensions */
int fillval = 0;
@@ -3587,7 +3587,7 @@ check_external_link_creation_tags(void)
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
@@ -3695,7 +3695,7 @@ check_external_link_open_tags(void)
hid_t xid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif /* NDEBUG */ /* end debugging functions */
+#endif
H5O_native_info_t ninfo; /* Native object info struct */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
diff --git a/test/dsets.c b/test/dsets.c
index 7684de4..bb12b38 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -7655,10 +7655,10 @@ static herr_t
test_deprec(hid_t file)
{
hid_t dataset, space, small_space, create_parms, dcpl;
- hsize_t dims[2], small_dims[2];
- hsize_t deprec_size;
- herr_t status;
- hsize_t csize[2];
+ hsize_t dims[2], small_dims[2];
+ hsize_t deprec_size;
+ herr_t H5_ATTR_SANITY_CHECK status;
+ hsize_t csize[2];
TESTING("deprecated API routines");
diff --git a/test/dtypes.c b/test/dtypes.c
index ec82ffd..98abe5c 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -6732,7 +6732,7 @@ static void create_del_obj_named_test_file(const char *filename, hid_t fapl,
hid_t my_fapl; /* Copy of file access property list ID */
hid_t dcpl; /* Dataset creation property list ID */
unsigned use_at_least_v18;/* Whether to use old or new format */
- herr_t status; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK status; /* Generic return value */
/* Make copy of FAPL */
my_fapl = H5Pcopy(fapl);
diff --git a/test/mf.c b/test/mf.c
index 3a6a21f..30bc91b 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -38,6 +38,7 @@
#include "H5Iprivate.h"
#include "H5VLprivate.h" /* Virtual Object Layer */
#include "H5VMprivate.h"
+#include "H5private.h"
#define FILENAME_LEN 1024
@@ -7528,7 +7529,8 @@ error:
*-------------------------------------------------------------------------
*/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi,
+ hbool_t split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 92325f3..d79705e 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -42,6 +42,12 @@
#define FILENAME_LEN 1024
+#ifndef H5_HAVE_PARALLEL
+#define NUM_DSETS 5
+#define NX 100
+#define NY 50
+#endif
+
/* helper routines */
#ifndef H5_HAVE_PARALLEL
static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
diff --git a/test/tfile.c b/test/tfile.c
index 4c23488..bce7ce9 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -25,6 +25,7 @@
#include "H5Iprivate.h"
#include "H5Pprivate.h"
#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5private.h"
/*
* This file needs to access private information from the H5F package.
@@ -4208,7 +4209,8 @@ test_filespace_info(const char *env_h5_drvr)
**
*****************************************************************/
static int
-set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split)
+set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi,
+ hbool_t split)
{
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl_arr[H5FD_MEM_NTYPES];
diff --git a/test/tmisc.c b/test/tmisc.c
index 34d20bf..c9162cb 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -130,10 +130,18 @@ typedef struct
#define MISC8_DSETNAME1 "Dataset1"
#define MISC8_DSETNAME4 "Dataset4"
#define MISC8_DSETNAME5 "Dataset5"
+#define MISC8_DSETNAME8 "Dataset8"
+
#ifndef H5_HAVE_PARALLEL
+#define MISC8_DSETNAME2 "Dataset2"
+#define MISC8_DSETNAME3 "Dataset3"
+#define MISC8_DSETNAME4 "Dataset4"
+#define MISC8_DSETNAME6 "Dataset6"
#define MISC8_DSETNAME7 "Dataset7"
+#define MISC8_DSETNAME9 "Dataset9"
+#define MISC8_DSETNAME10 "Dataset10"
#endif
-#define MISC8_DSETNAME8 "Dataset8"
+
#define MISC8_RANK 2
#define MISC8_DIM0 50
#define MISC8_DIM1 50
diff --git a/test/tselect.c b/test/tselect.c
index 27bc36b..348d30a 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -27,6 +27,7 @@
#include "testhdf5.h"
#include "hdf5.h"
#include "H5Spkg.h" /* Dataspaces */
+#include "H5private.h"
#define FILENAME "tselect.h5"
@@ -1613,7 +1614,7 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
****************************************************************/
static void
verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
- size_t cube_size, unsigned edge_size, unsigned cube_rank)
+ size_t H5_ATTR_SANITY_CHECK cube_size, unsigned edge_size, unsigned cube_rank)
{
const uint16_t *cube_ptr; /* Pointer into the cube buffer */
uint16_t expected_value; /* Expected value in dataset */
diff --git a/test/vds_swmr.h b/test/vds_swmr.h
index eb2dcf4..43c78a4 100644
--- a/test/vds_swmr.h
+++ b/test/vds_swmr.h
@@ -84,7 +84,7 @@
#define N_PLANES_TO_WRITE 25
/* Planes */
-static hsize_t PLANES[N_SOURCES][RANK] = {
+H5TEST_DLLVAR hsize_t PLANES[N_SOURCES][RANK] = {
{1, SM_HEIGHT, WIDTH},
{1, LG_HEIGHT, WIDTH},
{1, SM_HEIGHT, WIDTH},
@@ -94,7 +94,7 @@ static hsize_t PLANES[N_SOURCES][RANK] = {
};
/* File names for source datasets */
-static char FILE_NAMES[N_SOURCES][NAME_LEN] = {
+H5TEST_DLLVAR char FILE_NAMES[N_SOURCES][NAME_LEN] = {
{"vds_swmr_src_a.h5"},
{"vds_swmr_src_b.h5"},
{"vds_swmr_src_c.h5"},
@@ -104,11 +104,11 @@ static char FILE_NAMES[N_SOURCES][NAME_LEN] = {
};
/* VDS file name */
-static char VDS_FILE_NAME[NAME_LEN] = "vds_swmr.h5";
+H5TEST_DLLVAR char VDS_FILE_NAME[NAME_LEN] = "vds_swmr.h5";
/* Dataset names */
-static char SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
-static char VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+H5TEST_DLLVAR char SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+H5TEST_DLLVAR char VDS_DSET_NAME[NAME_LEN] = "vds_dset";
/* Fill values */
#endif /* VDS_SWMR_H */
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index cbbb18e..8f853d1 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -28,7 +28,7 @@
#include "H5Fpkg.h"
#include "H5Iprivate.h"
#include "H5MFprivate.h"
-
+#include "H5private.h"
#define BASE_ADDR (haddr_t)1024
@@ -2379,7 +2379,7 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr)
*-------------------------------------------------------------------------
*/
static void *
-datum_deserialize(const void * image_ptr,
+datum_deserialize(const void H5_ATTR_SANITY_CHECK *image_ptr,
H5_ATTR_UNUSED size_t len,
void * udata_ptr,
hbool_t * dirty_ptr)
@@ -2492,14 +2492,13 @@ datum_image_len(const void *thing, size_t *image_len)
*/
static herr_t
datum_serialize(const H5F_t *f,
- void *image_ptr,
+ void H5_ATTR_SANITY_CHECK *image_ptr,
size_t len,
void *thing_ptr)
{
herr_t ret_value = SUCCEED;
int idx;
struct datum * entry_ptr;
- H5C_t * cache_ptr;
struct H5AC_aux_t * aux_ptr;
HDassert( thing_ptr );
@@ -2510,11 +2509,8 @@ datum_serialize(const H5F_t *f,
HDassert( f );
HDassert( f->shared );
HDassert( f->shared->cache );
-
- cache_ptr = f->shared->cache;
-
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->aux_ptr );
+ HDassert( f->shared->cache->magic == H5C__H5C_T_MAGIC );
+ HDassert( f->shared->cache->aux_ptr );
aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr);
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index 15aec2d..cabb51e 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -215,6 +215,9 @@ test_filter_read(void)
unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */
herr_t hrc;
const char *filename;
+#ifdef H5_HAVE_FILTER_FLETCHER32
+ hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */
+#endif
#ifdef H5_HAVE_FILTER_DEFLATE
hsize_t deflate_size; /* Size of dataset with deflate filter */
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 63ac8d3..4e8a519 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -13,6 +13,7 @@
#include "testphdf5.h"
#include "H5Dprivate.h"
+#include "H5private.h"
#define DIM 2
#define SIZE 32
@@ -1959,7 +1960,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* private communicator size and rank */
int mpi_size;
int mpi_rank;
- int mrc; /* mpi error code */
+ int H5_ATTR_SANITY_CHECK mrc; /* mpi error code */
/* steps to verify and have been verified */
int steps = 0;
int steps_done = 0;
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index da6d343..c3cc7b5 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -37,7 +37,7 @@
static void coll_write_test(int chunk_factor);
-static void coll_read_test(int chunk_factor);
+static void coll_read_test(void);
/*-------------------------------------------------------------------------
@@ -84,7 +84,7 @@ void
coll_irregular_cont_read(void)
{
- coll_read_test(0);
+ coll_read_test();
}
@@ -133,7 +133,7 @@ void
coll_irregular_simple_chunk_read(void)
{
- coll_read_test(1);
+ coll_read_test();
}
@@ -181,7 +181,7 @@ void
coll_irregular_complex_chunk_read(void)
{
- coll_read_test(4);
+ coll_read_test();
}
@@ -662,7 +662,7 @@ void coll_write_test(int chunk_factor)
*-------------------------------------------------------------------------
*/
static void
-coll_read_test(int H5_ATTR_UNUSED chunk_factor)
+coll_read_test(void)
{
const char *filename;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 93c04a7..a17f588 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -3312,7 +3312,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
if (vmaps) {
size_t next;
- ssize_t ssize_out;
+ ssize_t H5_ATTR_SANITY_CHECK ssize_out;
ctx->indent_level++;
for (next = 0; next < (unsigned) vmaps; next++) {
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 27a9de1..45e436c 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -1288,9 +1288,9 @@ done:
*-----------------------------------------------------------------------------
*/
int
-h5tools_set_configured_fapl(hid_t fapl_id,
- const char vfd_name[],
- void H5_ATTR_UNUSED *fapl_t_ptr)
+h5tools_set_configured_fapl(hid_t fapl_id,
+ const char vfd_name[],
+ void *fapl_t_ptr)
{
int ret_value = 1;
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index da0519e..5ba5fb3 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -305,7 +305,7 @@ void print_manager_output(void)
*
*-------------------------------------------------------------------------
*/
-void h5diff_exit(int H5_ATTR_UNUSED status)
+void h5diff_exit(int status)
{
/* if in parallel mode, dismiss workers, close down MPI, then exit */
if(g_Parallel) {
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 05bad77..668886b 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -4227,7 +4227,7 @@ static void test_comps_array(const char *fname, const char *dset, const char *at
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY };
int i, j;
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Initialize array data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4336,7 +4336,7 @@ static void test_comps_vlen(const char * fname, const char *dset, const char *at
hsize_t sdims_dset[] = { SDIM_DSET };
unsigned i, j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4454,7 +4454,7 @@ static void test_comps_array_vlen(const char * fname, const char *dset, const ch
hsize_t sdims_dset[] = { SDIM_DSET };
hsize_t sdims_arry[] = { SDIM_CMPD_ARRAY };
unsigned i, j, k; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Initialize array data to write in compound1 */
for (i = 0; i < SDIM_DSET; i++) {
@@ -4597,7 +4597,7 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha
hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY };
unsigned i, j, k; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for (i = 0; i < SDIM_DSET; i++) {
@@ -5211,10 +5211,10 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make
RED, GREEN
} e_t;
- hid_t aid = H5I_INVALID_HID;
- hid_t sid = H5I_INVALID_HID;
- hid_t tid = H5I_INVALID_HID;
- herr_t status;
+ hid_t aid = -1;
+ hid_t sid = -1;
+ hid_t tid = -1;
+ herr_t H5_ATTR_SANITY_CHECK status;
int val, i, j, k, l, n;
float f;
@@ -6202,10 +6202,10 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
RED, GREEN
} e_t;
- hid_t aid = H5I_INVALID_HID;
- hid_t sid = H5I_INVALID_HID;
- hid_t tid = H5I_INVALID_HID;
- herr_t status;
+ hid_t aid = -1;
+ hid_t sid = -1;
+ hid_t tid = -1;
+ herr_t H5_ATTR_SANITY_CHECK status;
int val, i, j, k, l, n;
float f;
@@ -7193,11 +7193,11 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff
RED, GREEN
} e_t;
- hid_t did = H5I_INVALID_HID;
- hid_t sid = H5I_INVALID_HID;
- hid_t tid = H5I_INVALID_HID;
- hid_t dcpl = H5I_INVALID_HID;
- herr_t status;
+ hid_t did = -1;
+ hid_t sid = -1;
+ hid_t tid = -1;
+ hid_t dcpl = -1;
+ herr_t H5_ATTR_SANITY_CHECK status;
int val, i, j, k, l, n;
float f;
int fillvalue = 2;
@@ -7832,7 +7832,7 @@ void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */)
hsize_t start[10]; /* starting location of hyperslab */
hsize_t count[10]; /* element count of hyperslab */
hsize_t coord[5][2]; /* coordinates for point selection */
- herr_t status;
+ herr_t H5_ATTR_SANITY_CHECK status;
int i;
/* allocate the buffer for write the references */
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index e6e192f..290d382 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -1572,7 +1572,7 @@ gent_many(void)
dset1_t dset1[6];
hsize_t dim[4];
- herr_t ret;
+ herr_t H5_ATTR_SANITY_CHECK ret;
fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2632,7 +2632,7 @@ static void gent_vldatatypes(void)
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
int i;
- herr_t ret=0;
+ herr_t H5_ATTR_SANITY_CHECK ret=0;
file = H5Fcreate(FILE21, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2727,7 +2727,7 @@ gent_vldatatypes2(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i = 0; i < SPACE1_DIM1; i++) {
@@ -2800,7 +2800,7 @@ static void gent_vldatatypes3(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2869,7 +2869,7 @@ static void gent_vldatatypes4(void)
hid_t tid1, tid2; /* Datatype IDs */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize VL data to write */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2926,14 +2926,14 @@ static void gent_vldatatypes4(void)
/* Generate a variable-length dataset with NULL values in it */
static void gent_vldatatypes5(void)
{
- hvl_t wdata [SPACE1_DIM1];
- hid_t fid1;
- hid_t dataset;
- hid_t sid1;
- hid_t tid1;
- hsize_t dims1[] = {SPACE1_DIM1};
- int i,j; /* counting variable */
- herr_t ret; /* Generic return value */
+ hvl_t wdata [SPACE1_DIM1];
+ hid_t fid1;
+ hid_t dataset;
+ hid_t sid1;
+ hid_t tid1;
+ hsize_t dims1[] = {SPACE1_DIM1};
+ int i,j; /* counting variable */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* initialize data for dataset */
for(i=0; i<SPACE1_DIM1; i++) {
@@ -2995,15 +2995,15 @@ static void gent_vldatatypes5(void)
static void gent_array1_big(void)
{
- int *wdata; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Datatype ID */
- hsize_t sdims1[] = {SPACE_ARRAY1BIG_DIM};
- hsize_t tdims1[] = {ARRAY1BIG_DIM};
- int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ int *wdata; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t sdims1[] = {SPACE_ARRAY1BIG_DIM};
+ hsize_t tdims1[] = {ARRAY1BIG_DIM};
+ int i,j; /* counting variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* for region reference dataset */
@@ -3130,15 +3130,15 @@ static void gent_array1(void)
static void gent_array2(void)
{
- int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
- hid_t fid; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid; /* Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
- int i,j,k,l; /* counting variables */
- herr_t ret; /* Generic return value */
+ int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid; /* Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
+ int i,j,k,l; /* counting variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3176,17 +3176,17 @@ static void gent_array2(void)
static void gent_array3(void)
{
- int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
- hid_t fid; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid1; /* 1-D array Datatype ID */
- hid_t tid2; /* 2-D array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
- int i,j,k,l; /* counting variables */
- herr_t ret; /* Generic return value */
+ int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid1; /* 1-D array Datatype ID */
+ hid_t tid2; /* 2-D array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
+ int i,j,k,l; /* counting variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Allocate and initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3233,16 +3233,16 @@ static void gent_array4(void)
int i;
float f;
} s2_t;
- s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Compound Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Compound Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j; /* counting variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3299,17 +3299,17 @@ static void gent_array5(void)
int i;
float f[ARRAY1_DIM1];
} s2_t;
- s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Compound Datatype ID */
- hid_t tid3; /* Nested Array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Compound Datatype ID */
+ hid_t tid3; /* Nested Array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j,k; /* counting variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3370,16 +3370,16 @@ static void gent_array5(void)
static void gent_array6(void)
{
- hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* VL Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* VL Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j,k; /* counting variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3430,17 +3430,17 @@ static void gent_array6(void)
static void gent_array7(void)
{
- hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* VL Datatype ID */
- hid_t tid3; /* Nested Array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int i,j,k,l; /* Index variables */
- herr_t ret; /* Generic return value */
+ hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* VL Datatype ID */
+ hid_t tid3; /* Nested Array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int i,j,k,l; /* Index variables */
+ herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
@@ -3500,11 +3500,11 @@ static void gent_array7(void)
/* Test the boundary of the display output buffer at the reallocation event */
static void gent_array8(void)
{
- hid_t file = H5I_INVALID_HID; /* Handles */
- hid_t filetype = H5I_INVALID_HID; /* Handles */
- hid_t space = H5I_INVALID_HID; /* Handles */
- hid_t dset = H5I_INVALID_HID; /* Handles */
- herr_t status = -1;
+ hid_t file = -1; /* Handles */
+ hid_t filetype = -1; /* Handles */
+ hid_t space = -1; /* Handles */
+ hid_t dset = -1; /* Handles */
+ herr_t H5_ATTR_SANITY_CHECK status = -1;
hsize_t sdims[] = {F64_DIM0};
hsize_t tdims[] = {F64_DIM1};
int *wdata; /* Write buffer */
@@ -3571,7 +3571,7 @@ static void gent_empty(void)
} empty_struct;
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
- herr_t ret=0;
+ herr_t H5_ATTR_SANITY_CHECK ret=0;
file = H5Fcreate(FILE32, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3968,7 +3968,7 @@ static void write_attr_in(hid_t loc_id,
hid_t aid;
hid_t sid;
hid_t tid;
- herr_t status;
+ herr_t H5_ATTR_SANITY_CHECK status;
int val, i, j, k, n;
float f;
@@ -4409,7 +4409,7 @@ static void write_dset_in(hid_t loc_id,
hid_t sid;
hid_t tid;
hid_t plist_id;
- herr_t status;
+ herr_t H5_ATTR_SANITY_CHECK status;
int val, i, j, k, n;
float f;
int fillvalue=2;
@@ -4847,7 +4847,7 @@ static void gent_attr_all(void)
hid_t root_id;
hid_t sid;
hsize_t dims[1] = {2};
- herr_t status;
+ herr_t H5_ATTR_SANITY_CHECK status;
/* Create a file and a dataset */
fid = H5Fcreate(FILE40, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5005,7 +5005,7 @@ static void gent_compound_complex(void)
hid_t array4_tid; /* Array datatype handle */
hid_t datafile, dataset; /* Datafile/dataset handles */
hid_t dataspace; /* Dataspace handle */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
hsize_t dim[] = {F41_LENGTH}; /* Dataspace dimensions */
hsize_t array_dimb[] = {F41_DIMb}; /* Array dimensions */
hsize_t array_dimd[]={F41_ARRAY_DIMd1,F41_ARRAY_DIMd2}; /* Array dimensions */
@@ -5154,7 +5154,7 @@ static void gent_named_dtype_attr(void)
hid_t aid;
hid_t gid;
int data=8;
- herr_t ret;
+ herr_t H5_ATTR_SANITY_CHECK ret;
/* Create a file */
fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -5376,7 +5376,7 @@ make_external(hid_t fid)
hsize_t cur_size[1]; /*data space current size */
hsize_t max_size[1]; /*data space maximum size */
hsize_t size; /*bytes reserved for data in the external file*/
- int ret;
+ int H5_ATTR_SANITY_CHECK ret;
cur_size[0] = max_size[0] = 100;
size = (max_size[0]*sizeof(int)/2);
@@ -5424,7 +5424,7 @@ static void gent_filters(void)
hsize_t dims1[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf1[DIM1][DIM2];
- int i, j, n, ret;
+ int i, j, n, H5_ATTR_SANITY_CHECK ret;
for(i=n=0; i<DIM1; i++){
for(j=0; j<DIM2; j++){
@@ -5770,7 +5770,7 @@ static void gent_fcontents(void)
hid_t tid; /* datatype ID */
hsize_t dims[1]={4};
int buf[4]={1,2,3,4};
- int ret;
+ int H5_ATTR_SANITY_CHECK ret;
/* create a file */
@@ -5904,7 +5904,7 @@ static void gent_fvalues(void)
hvl_t fillval3; /* vlen fill value */
hsize_t dimarray[1]={3}; /* array dimension */
int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */
- int ret;
+ int H5_ATTR_SANITY_CHECK ret;
/* create a file */
fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6062,9 +6062,9 @@ static void gent_string(void)
c_t buf3 = {24, "Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
char buf4[] = {"Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
hsize_t dims1[] = {1};
- hsize_t dims2[] = {SPACE1_DIM1};
- hsize_t dims4[1];
- int ret;
+ hsize_t dims2[] = {SPACE1_DIM1};
+ hsize_t dims4[1];
+ int H5_ATTR_SANITY_CHECK ret;
dims4[0] = sizeof(buf4);
@@ -6159,7 +6159,7 @@ static void gent_aindices(void)
int buf2[10][10];
int buf3[2][10][10];
int buf4[2][2][10][10];
- int i, j, k, l, n, ret;
+ int i, j, k, l, n, H5_ATTR_SANITY_CHECK ret;
for(i = n = 0; i < 100; i++)
buf1[i] = n++;
@@ -6226,11 +6226,11 @@ static void gent_aindices(void)
*/
static void gent_longlinks(void)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group ID */
- hid_t gid2 = (-1); /* Datatype ID */
- char *objname = NULL; /* Name of object [Long] */
- size_t u; /* Local index variable */
+ hid_t fid = (-1); /* File ID */
+ hid_t gid = (-1); /* Group ID */
+ hid_t H5_ATTR_SANITY_CHECK gid2 = (-1); /* Datatype ID */
+ char *objname = NULL; /* Name of object [Long] */
+ size_t u; /* Local index variable */
/* Create files */
fid = H5Fcreate(FILE51, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6407,7 +6407,7 @@ gent_bigdims(void)
hsize_t i;
char c;
size_t nelmts;
- int ret;
+ int H5_ATTR_SANITY_CHECK ret;
/* create a file */
fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -6503,7 +6503,7 @@ gent_hyperslab(void)
hid_t fid; /* file id */
hsize_t dims[2] = {32,4097}; /* big enough data size to force a second stripmine read */
double *buf;
- int i, ret;
+ int i, H5_ATTR_SANITY_CHECK ret;
buf = (double*) HDmalloc(32 * 4097 * sizeof(double) );
for(i = 0; i < 32 * 4097; i++)
@@ -7129,7 +7129,7 @@ gent_dataset_idx(void)
hsize_t dims[2];
hsize_t maxdims[2];
int buf[20][10];
- int i, j, ret;
+ int i, j, H5_ATTR_SANITY_CHECK ret;
/* Get a copy of the file aaccess property */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -7653,7 +7653,7 @@ static void
gent_charsets(void)
{
hid_t fid, did, sid;
- herr_t status;
+ herr_t H5_ATTR_SANITY_CHECK status;
hsize_t dim[] = {1}; /* Dataspace dimensions */
typedef struct CharSetInfo {
const char *ascii_p_;
@@ -7727,7 +7727,7 @@ static void gent_compound_intsizes(void) {
Array1Struct *Array1;
hid_t Array1Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */
int m, n, o; /* Array init loop vars */
@@ -8000,7 +8000,7 @@ static void gent_compound_attr_intsizes(void) {
Array1Struct *Array1 = NULL;
hid_t Array1Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */
int m, n, o; /* Array init loop vars */
@@ -8880,7 +8880,7 @@ static void gent_compound_int_array(void) {
Cmpd1Struct *Cmpd1;
hid_t Cmpd1Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */
int m, n; /* Array init loop vars */
@@ -9136,7 +9136,7 @@ static void gent_compound_ints(void) {
hid_t Cmpd1Structid; /* File datatype identifier */
hid_t Cmpd2Structid; /* File datatype identifier */
- herr_t status; /* Error checking variable */
+ herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */
hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */
int m; /* Array init loop vars */
@@ -10438,7 +10438,7 @@ static void gent_udfilter(void)
hsize_t dims1[RANK] = {DIM1,DIM2};
hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
int buf1[DIM1][DIM2];
- int i, j, n, ret;
+ int i, j, n, H5_ATTR_SANITY_CHECK ret;
for(i=n=0; i<DIM1; i++){
for(j=0; j<DIM2; j++){
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index f32e87c..46fccd5 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3682,12 +3682,12 @@ out:
static int
make_userblock(void)
{
- hid_t fid = H5I_INVALID_HID;
- hid_t fcpl = H5I_INVALID_HID;
- int fd = -1; /* File descriptor for writing userblock */
- char ub[USERBLOCK_SIZE]; /* User block data */
- ssize_t nwritten; /* # of bytes written */
- size_t u; /* Local index variable */
+ hid_t fid = -1;
+ hid_t fcpl = -1;
+ int fd = -1; /* File descriptor for writing userblock */
+ char ub[USERBLOCK_SIZE]; /* User block data */
+ ssize_t H5_ATTR_SANITY_CHECK nwritten; /* # of bytes written */
+ size_t u; /* Local index variable */
/* Create file creation property list with userblock set */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -3749,7 +3749,7 @@ verify_userblock( const char* filename)
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
hsize_t ub_size = 0; /* User block size */
- ssize_t nread; /* # of bytes read */
+ ssize_t H5_ATTR_SANITY_CHECK nread; /* # of bytes read */
size_t u; /* Local index variable */
/* Open file with userblock */
@@ -3816,7 +3816,7 @@ make_userblock_file(void)
{
int fd = -1; /* File descriptor for writing userblock */
char ub[USERBLOCK_SIZE]; /* User block data */
- ssize_t nwritten; /* # of bytes written */
+ ssize_t H5_ATTR_SANITY_CHECK nwritten; /* # of bytes written */
size_t u; /* Local index variable */
/* initialize userblock data */
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 57c0d52..0e96cc7 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -133,7 +133,7 @@ synchronize (void)
#if defined(H5_HAVE_WIN32_API) && ! defined(__CYGWIN__)
_flushall();
#else
- int status;
+ int H5_ATTR_SANITY_CHECK status;
status = HDsystem("sync");
HDassert(status >= 0);
@@ -168,8 +168,8 @@ main (void)
static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS;
unsigned char *the_data = NULL;
- hid_t file, dset, file_space = H5I_INVALID_HID;
- herr_t status;
+ hid_t file, dset, file_space = -1;
+ herr_t H5_ATTR_SANITY_CHECK status;
#ifdef H5_HAVE_GETRUSAGE
struct rusage r_start, r_stop;
#else
@@ -178,8 +178,8 @@ main (void)
struct timeval t_start, t_stop;
int fd;
unsigned u;
- hssize_t n;
- off_t offset;
+ hssize_t H5_ATTR_SANITY_CHECK n;
+ off_t H5_ATTR_SANITY_CHECK offset;
hsize_t start[2];
hsize_t count[2];
@@ -198,15 +198,15 @@ main (void)
/* Open the files */
file = H5Fcreate (HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- assert (file>=0);
+ HDassert (file>=0);
fd = HDopen (RAW_FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
- assert (fd>=0);
+ HDassert (fd>=0);
/* Create the dataset */
file_space = H5Screate_simple (2, size, size);
- assert(file_space >= 0);
+ HDassert(file_space >= 0);
dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(dset >= 0);
+ HDassert(dset >= 0);
the_data = (unsigned char *)malloc((size_t)(size[0] * size[1]));
/* initial fill for lazy malloc */
@@ -268,7 +268,7 @@ main (void)
HDfflush(stderr);
status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDassert (status>=0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -306,9 +306,9 @@ main (void)
putc (PROGRESS, stderr);
HDfflush(stderr);
offset = HDlseek (fd, (off_t)0, SEEK_SET);
- assert (0==offset);
+ HDassert (0==offset);
n = HDwrite (fd, the_data, (size_t)(size[0]*size[1]));
- assert (n>=0 && (size_t)n==size[0]*size[1]);
+ HDassert (n>=0 && (size_t)n==size[0]*size[1]);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -347,7 +347,7 @@ main (void)
HDfflush(stderr);
status = H5Dwrite (dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL,
H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDassert (status>=0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -385,9 +385,9 @@ main (void)
putc (PROGRESS, stderr);
HDfflush(stderr);
offset = HDlseek (fd, (off_t)0, SEEK_SET);
- assert (0==offset);
+ HDassert (0==offset);
n = HDread (fd, the_data, (size_t)(size[0]*size[1]));
- assert (n>=0 && (size_t)n==size[0]*size[1]);
+ HDassert (n>=0 && (size_t)n==size[0]*size[1]);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -427,7 +427,7 @@ main (void)
HDfflush(stderr);
status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDassert (status>=0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);
@@ -449,11 +449,11 @@ main (void)
(size_t)(nread*size[0]*size[1]));
/* Read hyperslab */
- assert (size[0]>20 && size[1]>20);
+ HDassert (size[0]>20 && size[1]>20);
start[0] = start[1] = 10;
count[0] = count[1] = size[0]-20;
status = H5Sselect_hyperslab (file_space, H5S_SELECT_SET, start, NULL, count, NULL);
- assert (status>=0);
+ HDassert (status>=0);
synchronize ();
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_start);
@@ -471,7 +471,7 @@ main (void)
HDfflush(stderr);
status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space,
H5P_DEFAULT, the_data);
- assert (status>=0);
+ HDassert (status>=0);
}
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage(RUSAGE_SELF, &r_stop);