summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Atest.c2
-rw-r--r--src/H5CX.c40
-rw-r--r--src/H5CXprivate.h2
-rw-r--r--src/H5Ftest.c4
-rw-r--r--src/H5Gtest.c24
-rw-r--r--src/H5Itest.c9
-rw-r--r--src/H5Otest.c16
-rw-r--r--src/H5VLint.c6
-rw-r--r--src/H5private.h6
-rw-r--r--test/accum.c12
-rw-r--r--test/accum_swmr_reader.c4
-rw-r--r--test/app_ref.c2
-rw-r--r--test/big.c104
-rw-r--r--test/btree2.c30
-rw-r--r--test/cache.c6
-rw-r--r--test/cache_tagging.c111
-rw-r--r--test/dsets.c117
-rw-r--r--test/earray.c127
-rw-r--r--test/efc.c4
-rw-r--r--test/farray.c6
-rw-r--r--test/fheap.c14
-rw-r--r--test/freespace.c4
-rw-r--r--test/gheap.c14
-rw-r--r--test/lheap.c10
-rw-r--r--test/mf.c4
-rw-r--r--test/ohdr.c20
-rw-r--r--test/page_buffer.c5
-rw-r--r--test/unregister.c4
-rw-r--r--testpar/t_cache.c84
-rw-r--r--testpar/t_file.c8
-rw-r--r--tools/src/misc/h5debug.c12
31 files changed, 369 insertions, 442 deletions
diff --git a/src/H5Atest.c b/src/H5Atest.c
index 62d608e..6537a9d 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -136,7 +136,7 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count")
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5CX.c b/src/H5CX.c
index f3a5eef..cff06f6 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -422,7 +422,7 @@ typedef struct H5CX_fapl_cache_t {
static H5CX_node_t **H5CX__get_context(void);
#endif /* H5_HAVE_THREADSAFE */
static void H5CX__push_common(H5CX_node_t *cnode);
-static H5CX_node_t *H5CX__pop_common(void);
+static H5CX_node_t *H5CX__pop_common(hbool_t update_dxpl_props);
/*********************/
/* Package Variables */
@@ -678,7 +678,7 @@ H5CX_term_package(void)
/* Pop the top context node from the stack */
/* (Can't check for errors, as rest of library is shut down) */
- cnode = H5CX__pop_common();
+ cnode = H5CX__pop_common(FALSE);
/* Free the context node */
/* (Allocated with HDmalloc() in H5CX_push_special() ) */
@@ -932,9 +932,11 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
/* Keep a reference to the current VOL wrapping context */
(*api_state)->vol_wrap_ctx = (*head)->ctx.vol_wrap_ctx;
- if (NULL != (*api_state)->vol_wrap_ctx)
+ if (NULL != (*api_state)->vol_wrap_ctx) {
+ HDassert((*head)->ctx.vol_wrap_ctx_valid);
if (H5VL_inc_vol_wrapper((*api_state)->vol_wrap_ctx) < 0)
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "can't increment refcount on VOL wrapping context")
+ } /* end if */
/* Keep a copy of the VOL connector property, if there is one */
if ((*head)->ctx.vol_connector_prop_valid && (*head)->ctx.vol_connector_prop.connector_id > 0) {
@@ -1023,6 +1025,8 @@ H5CX_restore_state(const H5CX_state_t *api_state)
/* Restore the VOL wrapper context */
(*head)->ctx.vol_wrap_ctx = api_state->vol_wrap_ctx;
+ if (NULL != (*head)->ctx.vol_wrap_ctx)
+ (*head)->ctx.vol_wrap_ctx_valid = TRUE;
/* Restore the VOL connector info */
if (api_state->vol_connector_prop.connector_id) {
@@ -3559,7 +3563,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5CX_node_t *
-H5CX__pop_common(void)
+H5CX__pop_common(hbool_t update_dxpl_props)
{
H5CX_node_t **head =
H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
@@ -3575,21 +3579,23 @@ H5CX__pop_common(void)
HDassert(head && *head);
/* Check for cached DXPL properties to return to application */
+ if (update_dxpl_props) {
#ifdef H5_HAVE_PARALLEL
- H5CX_SET_PROP(H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, mpio_actual_chunk_opt)
- H5CX_SET_PROP(H5D_MPIO_ACTUAL_IO_MODE_NAME, mpio_actual_io_mode)
- H5CX_SET_PROP(H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, mpio_local_no_coll_cause)
- H5CX_SET_PROP(H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, mpio_global_no_coll_cause)
+ H5CX_SET_PROP(H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, mpio_actual_chunk_opt)
+ H5CX_SET_PROP(H5D_MPIO_ACTUAL_IO_MODE_NAME, mpio_actual_io_mode)
+ H5CX_SET_PROP(H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, mpio_local_no_coll_cause)
+ H5CX_SET_PROP(H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, mpio_global_no_coll_cause)
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, mpio_coll_chunk_link_hard)
- H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, mpio_coll_chunk_multi_hard)
- H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, mpio_coll_chunk_link_num_true)
- H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, mpio_coll_chunk_link_num_false)
- H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, mpio_coll_chunk_multi_ratio_coll)
- H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, mpio_coll_chunk_multi_ratio_ind)
- H5CX_SET_PROP(H5D_XFER_COLL_RANK0_BCAST_NAME, mpio_coll_rank0_bcast)
+ H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_HARD_NAME, mpio_coll_chunk_link_hard)
+ H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_HARD_NAME, mpio_coll_chunk_multi_hard)
+ H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_TRUE_NAME, mpio_coll_chunk_link_num_true)
+ H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_LINK_NUM_FALSE_NAME, mpio_coll_chunk_link_num_false)
+ H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_COLL_NAME, mpio_coll_chunk_multi_ratio_coll)
+ H5CX_SET_PROP(H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME, mpio_coll_chunk_multi_ratio_ind)
+ H5CX_SET_PROP(H5D_XFER_COLL_RANK0_BCAST_NAME, mpio_coll_rank0_bcast)
#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
#endif /* H5_HAVE_PARALLEL */
+ } /* end if */
/* Pop the top context node from the stack */
ret_value = (*head);
@@ -3614,7 +3620,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5CX_pop(void)
+H5CX_pop(hbool_t update_dxpl_props)
{
H5CX_node_t *cnode; /* Context node */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3622,7 +3628,7 @@ H5CX_pop(void)
FUNC_ENTER_NOAPI(FAIL)
/* Perform common operations and get top context from stack */
- if (NULL == (cnode = H5CX__pop_common()))
+ if (NULL == (cnode = H5CX__pop_common(update_dxpl_props)))
HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "error getting API context node")
/* Free the context node */
diff --git a/src/H5CXprivate.h b/src/H5CXprivate.h
index f9289cb..c500356 100644
--- a/src/H5CXprivate.h
+++ b/src/H5CXprivate.h
@@ -63,7 +63,7 @@ typedef struct H5CX_state_t {
/* Library private routines */
#ifndef H5private_H
H5_DLL herr_t H5CX_push(void);
-H5_DLL herr_t H5CX_pop(void);
+H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
#endif /* H5private_H */
H5_DLL void H5CX_push_special(void);
H5_DLL hbool_t H5CX_is_def_dxpl(void);
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index 03b613c..b76c579 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -118,7 +118,7 @@ H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_coun
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count")
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -162,7 +162,7 @@ H5F__check_cached_stab_test(hid_t file_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info")
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index 81adc86..0d21f22 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Monday, October 17, 2005
*
* Purpose: Group testing functions.
@@ -178,7 +178,7 @@ H5G__is_empty_test(hid_t gid)
} /* end if */
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -245,7 +245,7 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
} /* end if */
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -301,7 +301,7 @@ H5G__has_stab_test(hid_t gid)
HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found")
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -376,7 +376,7 @@ H5G__is_new_dense_test(hid_t gid)
} /* end if */
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -469,7 +469,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
if (bt2_corder && H5B2_close(bt2_corder) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -522,7 +522,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size")
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -553,10 +553,10 @@ done:
herr_t
H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *obj_hidden)
{
- void * obj_ptr; /* Pointer to object for ID */
- H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ void * obj_ptr; /* Pointer to object for ID */
+ const H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -633,7 +633,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
} /* end else */
done:
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Itest.c b/src/H5Itest.c
index defc587..6f2c03a 100644
--- a/src/H5Itest.c
+++ b/src/H5Itest.c
@@ -11,10 +11,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgoup.org>
- * Tuesday, July 27, 2010
- *
- * Purpose: ID testing functions.
+/*
+ * H5Itest.c - ID testing functions
*/
/****************/
@@ -28,7 +26,6 @@
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
#include "H5Gprivate.h" /* Groups */
@@ -105,7 +102,7 @@ done:
if (vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
HDONE_ERROR(H5E_ATOM, H5E_CANTRESET, FAIL, "can't reset VOL wrapper info")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTRESET, (-1), "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 0c7fb69..48bc77f 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, December 4, 2006
*
* Purpose: Object header testing functions.
@@ -128,7 +128,7 @@ H5O__is_attr_dense_test(hid_t oid)
done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -230,7 +230,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -327,7 +327,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -431,7 +431,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -667,7 +667,7 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num)
done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
@@ -778,8 +778,8 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type)
done:
if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O__msg_get_chunkno_test() */
+} /* H5O__msg_move_to_new_chunk_test() */
diff --git a/src/H5VLint.c b/src/H5VLint.c
index b7ea708..289dfef 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -222,7 +222,7 @@ H5VL__init_package(void)
FUNC_ENTER_PACKAGE
- /* Initialize the atom group for the VL IDs */
+ /* Initialize the ID group for the VL IDs */
if (H5I_register_type(H5I_VOL_CLS) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize H5VL interface")
@@ -710,7 +710,7 @@ H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_
/* Register VOL object as _object_ type, for future object API calls */
if ((ret_value = H5I_register(type, vol_obj, app_ref)) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize handle")
+ HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register handle")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2022,7 +2022,7 @@ H5VL_reset_lib_state(void)
FUNC_ENTER_NOAPI(FAIL)
/* Pop the API context off the stack */
- if (H5CX_pop() < 0)
+ if (H5CX_pop(FALSE) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't pop API context")
done:
diff --git a/src/H5private.h b/src/H5private.h
index 16291ca..0e824c8 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -2165,7 +2165,7 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
/* Forward declaration of H5CXpush() / H5CXpop() */
/* (Including H5CXprivate.h creates bad circular dependencies - QAK, 3/18/2018) */
H5_DLL herr_t H5CX_push(void);
-H5_DLL herr_t H5CX_pop(void);
+H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
#ifndef NDEBUG
#define FUNC_ENTER_CHECK_NAME(asrt) \
@@ -2568,7 +2568,7 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_LEAVE_API(ret_value) \
VFD_SWMR_LEAVE(ret_value); \
FUNC_LEAVE_API_COMMON(ret_value); \
- (void)H5CX_pop(); \
+ (void)H5CX_pop(TRUE); \
H5_POP_FUNC \
if (err_occurred) \
(void)H5E_dump_api_stack(TRUE); \
@@ -2580,7 +2580,7 @@ H5_DLL herr_t H5CX_pop(void);
/* Use this macro when VFD SWMR EOT is not used on leaving an API function */
#define FUNC_LEAVE_API_NO_EOT(ret_value) \
FUNC_LEAVE_API_COMMON(ret_value); \
- (void)H5CX_pop(); \
+ (void)H5CX_pop(TRUE); \
H5_POP_FUNC \
if (err_occurred) \
(void)H5E_dump_api_stack(TRUE); \
diff --git a/test/accum.c b/test/accum.c
index d7d7e4d..c3346bc 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -139,7 +139,7 @@ main(void)
nerrors += test_random_write(f);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -160,7 +160,7 @@ main(void)
error:
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
HDputs("*** TESTS FAILED ***");
return 1;
@@ -1964,8 +1964,8 @@ test_random_write(H5F_t *f)
/* Choose random # seed */
seed = (unsigned)HDtime(NULL);
#if 0
- /* seed = (unsigned)1155438845; */
- HDfprintf(stderr, "Random # seed was: %u\n", seed);
+/* seed = (unsigned)1155438845; */
+HDfprintf(stderr, "Random # seed was: %u\n", seed);
#endif
HDsrandom(seed);
@@ -2303,7 +2303,7 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -2321,7 +2321,7 @@ error:
H5Fclose(fid);
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
H5Pclose(fapl);
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index ffa81e5..ce0e830 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -98,7 +98,7 @@ main(void)
FAIL_STACK_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -113,7 +113,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/app_ref.c b/test/app_ref.c
index daf3efa..09cfb72 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Thursday, August 14, 2008
*
* Purpose: Tests closing the library after reference counts have been
diff --git a/test/big.c b/test/big.c
index 75b4dec..989e4bc 100644
--- a/test/big.c
+++ b/test/big.c
@@ -93,17 +93,17 @@ static int test_family(hid_t fapl);
static hsize_t values_used[WRT_N];
/*-------------------------------------------------------------------------
- * Function: randll
+ * Function: randll
*
- * Purpose: Create a random long long value.
- * Ensures that a write at this value doesn't overlap any
- * previous write.
+ * Purpose: Create a random long long value.
+ * Ensures that a write at this value doesn't overlap any
+ * previous write.
*
- * Return: Success: Random value
+ * Return: Success: Random value
*
- * Failure: Random value which overlaps another write
+ * Failure: Random value which overlaps another write
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Modifications:
@@ -141,17 +141,17 @@ randll(hsize_t limit, int current_index)
}
/*-------------------------------------------------------------------------
- * Function: is_sparse
+ * Function: is_sparse
*
- * Purpose: Determines if the file system of the current working
- * directory supports holes.
+ * Purpose: Determines if the file system of the current working
+ * directory supports holes.
*
- * Return: Success: Non-zero if holes are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if holes are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, July 15, 1998
*
* Modifications:
@@ -184,17 +184,17 @@ is_sparse(void)
}
/*-------------------------------------------------------------------------
- * Function: supports_big
+ * Function: supports_big
*
- * Purpose: Determines if the file system of the current working
- * directory supports big files.
+ * Purpose: Determines if the file system of the current working
+ * directory supports big files.
*
- * Return: Success: Non-zero if big files are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if big files are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 18, 2007
*
* Modifications:
@@ -254,17 +254,17 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: enough_room
+ * Function: enough_room
*
- * Purpose: Tries to create a bunch of sparse files to see if quotas will
- * get in the way. Some systems also have problems opening
- * enough files and we'll check that too.
+ * Purpose: Tries to create a bunch of sparse files to see if quotas will
+ * get in the way. Some systems also have problems opening
+ * enough files and we'll check that too.
*
- * Return: Success: Non-zero
+ * Return: Success: Non-zero
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 6, 1998
*
* Modifications:
@@ -322,20 +322,20 @@ done:
H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
- * Function: writer
+ * Function: writer
*
- * Purpose: Creates a *big* dataset.
+ * Purpose: Creates a *big* dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: >0
+ * Failure: >0
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
*
* Modifications:
- * Robb Matzke, 15 Jul 1998
- * Addresses are written to the file DNAME instead of stdout.
+ * Robb Matzke, 15 Jul 1998
+ * Addresses are written to the file DNAME instead of stdout.
*
*-------------------------------------------------------------------------
*/
@@ -475,15 +475,15 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: reader
+ * Function: reader
*
- * Purpose: Reads some data from random locations in the dataset.
+ * Purpose: Reads some data from random locations in the dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: >0
+ * Failure: >0
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, April 10, 1998
*
* Modifications:
@@ -583,13 +583,13 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: usage
+ * Function: usage
*
- * Purpose: Print command usage
+ * Purpose: Print command usage
*
- * Return: void
+ * Return: void
*
- * Programmer: Albert Chent
+ * Programmer: Albert Chent
* Mar 28, 2002
*
* Modifications:
@@ -747,22 +747,22 @@ error:
} /* end test_family() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, April 10, 1998
*
* Modifications:
- * Albert Cheng, 2002/03/28
- * Added command option -fsize.
- * Albert Cheng, 2002/04/19
- * Added command option -c.
+ * Albert Cheng, 2002/03/28
+ * Added command option -fsize.
+ * Albert Cheng, 2002/04/19
+ * Added command option -c.
*
* Raymond Lu, 2007/05/25
* Added similar tests for SEC2 and STDIO drivers.
diff --git a/test/btree2.c b/test/btree2.c
index 48564cb..f18b65c 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, February 1, 2005
*/
#include "h5test.h"
@@ -4964,10 +4964,10 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, const bt2_test_param_t
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1451342093;
- HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time = 1451342093;
+HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -8670,10 +8670,10 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1163537969;
- HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time = 1163537969;
+HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -8706,8 +8706,8 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
TEST_ERROR
/* Check for VFD which stores data in multiple files */
- single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
if (single_file_vfd) {
/* Make a copy of the file in memory, in order to speed up deletion testing */
@@ -10082,21 +10082,21 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
if (nerrors)
goto error;
- puts("All v2 B-tree tests passed.");
+ HDputs("All v2 B-tree tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY
{
@@ -10105,7 +10105,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return 1;
} /* end main() */
diff --git a/test/cache.c b/test/cache.c
index 44ee222..c7b2a25 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -42024,8 +42024,6 @@ check_stats__smoke_check_1(H5F_t *file_ptr)
/* reset cache min clean size to its expected value */
cache_ptr->min_clean_size = (1 * 1024 * 1024);
- return;
-
} /* check_stats__smoke_check_1() */
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -42415,7 +42413,7 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
}
/* Pop API context */
- H5CX_pop();
+ H5CX_pop(FALSE);
if ((!try_core_file_driver) || (core_file_driver_failed)) {
@@ -42433,8 +42431,6 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats)
}
}
- return;
-
} /* takedown_cache() */
/*-------------------------------------------------------------------------
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 3ed9a81..bcddd5a 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -434,8 +434,8 @@ check_file_creation_tags(hid_t fcpl_id, int type)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose test outout */
-#endif
+ int verbose = FALSE; /* verbose test outout */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t sbe_tag = 0;
@@ -539,10 +539,10 @@ check_file_open_tags(hid_t fcpl, int type)
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file outout */
-#endif
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag; /* Root Group Tag */
- haddr_t sbe_tag; /* Sblock Extension Tag */
+#endif /* NDEBUG */
+ hid_t fapl = -1; /* File access prop list */
+ haddr_t root_tag; /* Root Group Tag */
+ haddr_t sbe_tag; /* Sblock Extension Tag */
/* Testing Macro */
TESTING("tag application during file open");
@@ -668,8 +668,8 @@ check_group_creation_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */
haddr_t g_tag; /* Group Tag */
@@ -791,8 +791,8 @@ check_multi_group_creation_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
char gname[16]; /* group name buffer */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access prop list */
@@ -943,8 +943,8 @@ check_link_iteration_tags(void)
hid_t sid = -1; /* Group Identifier */
hid_t did = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
int i = 0; /* iterator */
haddr_t root_tag = 0; /* Root Group Tag Value */
char dsetname[500]; /* Name of dataset */
@@ -1085,8 +1085,8 @@ check_dense_attribute_tags(void)
hid_t did = -1; /* Group Identifier */
hid_t dcpl = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
int i = 0; /* iterator */
hid_t fapl = -1; /* File access property list */
haddr_t d_tag = 0; /* Dataset tag value */
@@ -1315,8 +1315,8 @@ check_group_open_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif
+ int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -1446,8 +1446,8 @@ check_attribute_creation_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Group Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0; /* Root group tag */
haddr_t g_tag = 0;
@@ -1611,8 +1611,8 @@ check_attribute_open_tags(hid_t fcpl, int type)
hid_t gid = -1; /* Group Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
haddr_t g_tag = 0;
@@ -1778,8 +1778,8 @@ check_attribute_rename_tags(hid_t fcpl, int type)
hid_t aid = -1; /* Attribute Identifier */
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
int * data = NULL; /* data buffer */
int i, j, k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -1991,8 +1991,8 @@ check_attribute_delete_tags(hid_t fcpl, int type)
hid_t aid = -1; /* Attribute Identifier */
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
int * data = NULL; /* data buffer */
int i, j, k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -2182,8 +2182,8 @@ check_dataset_creation_tags(hid_t fcpl, int type)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2342,8 +2342,8 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2508,8 +2508,8 @@ check_dataset_open_tags(void)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2660,8 +2660,8 @@ check_dataset_write_tags(void)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -2827,8 +2827,8 @@ check_attribute_write_tags(hid_t fcpl, int type)
hid_t aid = -1; /* Attribute Identifier */
hid_t sid = -1; /* Dataset Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
int * data = NULL; /* data buffer */
int i, j, k = 0; /* iterators */
hid_t fapl = -1; /* File access prop list */
@@ -3013,8 +3013,8 @@ check_dataset_read_tags(void)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3175,8 +3175,8 @@ check_dataset_size_retrieval(void)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3339,8 +3339,8 @@ check_dataset_extend_tags(void)
hid_t did = -1; /* Dataset Identifier */
hid_t sid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3501,8 +3501,8 @@ check_object_info_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif
+ int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3636,8 +3636,8 @@ check_object_copy_tags(void)
hid_t fid = -1; /* File Identifier */
hid_t gid = -1; /* Group Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif
+ int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = HADDR_UNDEF;
haddr_t g_tag;
@@ -3786,8 +3786,8 @@ check_link_removal_tags(hid_t fcpl, int type)
hid_t sid = -1; /* Dataspace Identifier */
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -3975,8 +3975,8 @@ check_link_getname_tags(void)
hid_t sid = -1; /* Dataspace Identifier */
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t dcpl = -1; /* dataset creation pl */
hsize_t cdims[2] = {1, 1}; /* chunk dimensions */
int fillval = 0;
@@ -4152,8 +4152,8 @@ check_external_link_creation_tags(void)
hid_t fid2 = -1; /* File Identifier */
hid_t gid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
@@ -4279,8 +4279,8 @@ check_external_link_open_tags(void)
hid_t gid = -1; /* Dataspace Identifier */
hid_t xid = -1; /* Dataspace Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file outout */
-#endif
+ int verbose = FALSE; /* verbose file outout */
+#endif /* NDEBUG */
H5O_native_info_t ninfo; /* Native object info struct */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag = 0;
@@ -4511,7 +4511,7 @@ check_invalid_tag_application(void)
TEST_ERROR;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
TEST_ERROR
api_ctx_pushed = FALSE;
@@ -4531,10 +4531,11 @@ check_invalid_tag_application(void)
#if H5C_DO_TAGGING_SANITY_CHECKS
error:
if (api_ctx_pushed)
- H5CX_pop();
-#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+ H5CX_pop(FALSE);
return 1;
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+
} /* check_invalid_tag_application */
/*-------------------------------------------------------------------------
diff --git a/test/dsets.c b/test/dsets.c
index ece862b..5452e8d 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the dataset interface (H5D)
@@ -373,13 +373,13 @@ test_create(hid_t file)
dims[0] = 256;
dims[1] = 512;
space = H5Screate_simple(2, dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/* Create a small data space for compact dataset */
small_dims[0] = 16;
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/*
* Create a dataset using the default dataset creation properties. We're
@@ -448,13 +448,13 @@ test_create(hid_t file)
* layout.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
/* Attempt to create a dataset with invalid chunk sizes */
csize[0] = dims[0] * 2;
csize[1] = dims[1] * 2;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
H5E_BEGIN_TRY
{
dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms,
@@ -470,7 +470,7 @@ test_create(hid_t file)
csize[0] = 5;
csize[1] = 100;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
dataset =
H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, H5P_DEFAULT);
@@ -492,11 +492,11 @@ test_create(hid_t file)
* Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- assert(status >= 0);
+ HDassert(status >= 0);
dataset = H5Dcreate2(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, create_parms,
H5P_DEFAULT);
@@ -540,7 +540,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
TESTING("simple I/O");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
/* Set up data array */
@@ -568,7 +569,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
/* Create a small conversion buffer to test strip mining */
tconv_buf = HDmalloc((size_t)1000);
xfer = H5Pcreate(H5P_DATASET_XFER);
- assert(xfer >= 0);
+ HDassert(xfer >= 0);
if (H5Pset_buffer(xfer, (size_t)1000, tconv_buf, NULL) < 0)
goto error;
@@ -700,7 +701,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("dataset offset with user block");
/* Can't run this test with multi-file VFDs because of HDopen/read/seek the file directly */
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0) {
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
/* Set up data array */
@@ -3053,7 +3055,7 @@ test_missing_filter(hid_t file)
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -3062,7 +3064,7 @@ test_missing_filter(hid_t file)
error:
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return FAIL;
} /* end test_missing_filter() */
@@ -3224,7 +3226,7 @@ test_nbit_int(hid_t file)
/* Initialize data, assuming size of long long >= size of int */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0f, (double)(precision - 1));
+ power = HDpow(2.0, (double)(precision - 1));
orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset);
/* even-numbered values are negtive */
@@ -3601,7 +3603,7 @@ test_nbit_array(hid_t file)
for (j = 0; j < (size_t)size[1]; j++)
for (m = 0; m < (size_t)adims[0]; m++)
for (n = 0; n < (size_t)adims[1]; n++) {
- power = HDpow(2.0F, (double)precision);
+ power = HDpow(2.0, (double)precision);
orig_data[i][j][m][n] =
(unsigned int)(((long long)HDrandom() % (long long)power) << offset);
} /* end for */
@@ -3797,11 +3799,11 @@ test_nbit_compound(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0F, (double)(precision[0] - 1));
+ power = HDpow(2.0, (double)(precision[0] - 1));
orig_data[i][j].i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0F, (double)(precision[1] - 1));
+ power = HDpow(2.0, (double)(precision[1] - 1));
orig_data[i][j].c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0F, (double)(precision[2] - 1));
+ power = HDpow(2.0, (double)(precision[2] - 1));
orig_data[i][j].s = (short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].f = float_val[i][j];
@@ -4079,32 +4081,32 @@ test_nbit_compound_2(hid_t file)
/* Initialize data, assuming size of long long >= size of member datatypes */
for (i = 0; i < (size_t)size[0]; i++)
for (j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0F, (double)(precision[0] - 1));
+ power = HDpow(2.0, (double)(precision[0] - 1));
orig_data[i][j].a.i = (int)(((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0F, (double)(precision[1] - 1));
+ power = HDpow(2.0, (double)(precision[1] - 1));
orig_data[i][j].a.c = (char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0F, (double)(precision[2] - 1));
- orig_data[i][j].a.s = (short)(-((long long)HDrandom() % (long long)power) << offset[2]);
+ power = HDpow(2.0, (double)(precision[2] - 1));
+ orig_data[i][j].a.s = (short)(-(((long long)HDrandom() % (long long)power) << offset[2]));
orig_data[i][j].a.f = float_val[i][j];
- power = HDpow(2.0F, (double)precision[3]);
+ power = HDpow(2.0, (double)precision[3]);
orig_data[i][j].v = (unsigned int)(((long long)HDrandom() % (long long)power) << offset[3]);
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0F, (double)(precision[4] - 1));
+ power = HDpow(2.0, (double)(precision[4] - 1));
orig_data[i][j].b[m][n] = (char)(((long long)HDrandom() % (long long)power) << offset[4]);
} /* end for */
for (m = 0; m < (size_t)array_dims[0]; m++)
for (n = 0; n < (size_t)array_dims[1]; n++) {
- power = HDpow(2.0F, (double)(precision[0] - 1));
+ power = HDpow(2.0, (double)(precision[0] - 1));
orig_data[i][j].d[m][n].i =
- (int)(-((long long)HDrandom() % (long long)power) << offset[0]);
- power = HDpow(2.0F, (double)(precision[1] - 1));
+ (int)(-(((long long)HDrandom() % (long long)power) << offset[0]));
+ power = HDpow(2.0, (double)(precision[1] - 1));
orig_data[i][j].d[m][n].c =
(char)(((long long)HDrandom() % (long long)power) << offset[1]);
- power = HDpow(2.0F, (double)(precision[2] - 1));
+ power = HDpow(2.0, (double)(precision[2] - 1));
orig_data[i][j].d[m][n].s =
(short)(((long long)HDrandom() % (long long)power) << offset[2]);
orig_data[i][j].d[m][n].f = float_val[i][j];
@@ -4335,7 +4337,7 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for (i = 0; i < (size_t)size[0]; i++) {
- power = HDpow(2.0F, 17.0F - 1.0F);
+ power = HDpow(2.0, 17.0 - 1.0);
HDmemset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
HDstrcpy(orig_data[i].str, "fixed-length C string");
@@ -4379,9 +4381,9 @@ test_nbit_compound_3(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
- if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 ||
- strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len ||
- new_data[i].r != orig_data[i].r) {
+ if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 ||
+ HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 ||
+ new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu\n", (unsigned long)i);
@@ -4524,7 +4526,7 @@ test_nbit_int_size(hid_t file)
*/
for (i = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++) {
- power = HDpow(2.0F, (double)(precision - 1));
+ power = HDpow(2.0, (double)(precision - 1));
orig[i][j] = HDrandom() % (int)power << offset;
}
@@ -5188,7 +5190,7 @@ test_scaleoffset_float(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0F, -3.0F)) {
+ if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -3.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5334,7 +5336,7 @@ test_scaleoffset_float_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0F, -3.0F)) {
+ if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0, -3.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -5455,7 +5457,7 @@ test_scaleoffset_double(hid_t file)
/* Check that the values read are the same as the values written */
for (i = 0; i < (size_t)size[0]; i++) {
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0F, -7.0F)) {
+ if (HDfabs(new_data[i][j] - orig_data[i][j]) > HDpow(10.0, -7.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -5601,7 +5603,7 @@ test_scaleoffset_double_2(hid_t file)
/* Check that the values read are the same as the values written */
for (j = 0; j < (size_t)size[1]; j++) {
- if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0F, -7.0F)) {
+ if (HDfabs(new_data[0][j] - orig_data[0][j]) > HDpow(10.0, -7.0)) {
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
@@ -6916,6 +6918,7 @@ error:
static herr_t
test_filter_delete(hid_t file)
{
+#ifdef H5_HAVE_FILTER_DEFLATE
H5Z_filter_t filtn; /* filter identification number */
hid_t dsid = -1; /* dataset ID */
hid_t sid = -1; /* dataspace ID */
@@ -6927,6 +6930,7 @@ test_filter_delete(hid_t file)
unsigned flags; /* flags for filter */
herr_t ret; /* generic return value */
int i;
+#endif
TESTING("filter deletion");
@@ -7031,9 +7035,7 @@ test_filter_delete(hid_t file)
goto error;
PASSED();
-#else
- SKIPPED();
-#endif
+
return SUCCEED;
error:
@@ -7046,6 +7048,10 @@ error:
}
H5E_END_TRY;
return FAIL;
+#else
+ SKIPPED();
+ return SUCCEED;
+#endif
} /* end test_filter_delete() */
/*-------------------------------------------------------------------------
@@ -7689,9 +7695,9 @@ error:
static H5_ATTR_CONST long
gcd(long l0, long r0)
{
- long magnitude, remainder;
- bool negative = ((l0 < 0) != (r0 < 0));
- long l = HDlabs(l0), r = HDlabs(r0);
+ long magnitude, remainder;
+ hbool_t negative = ((l0 < 0) != (r0 < 0));
+ long l = HDlabs(l0), r = HDlabs(r0);
do {
if (l < r) {
@@ -7781,7 +7787,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
TESTING(testname);
- assert(NPOINTS < 100);
+ HDassert(NPOINTS < 100);
h5_fixname(FILENAME[6], fapl, filename, sizeof filename);
@@ -8303,13 +8309,13 @@ test_deprec(hid_t file)
dims[0] = 256;
dims[1] = 512;
space = H5Screate_simple(2, dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/* Create a small data space for compact dataset */
small_dims[0] = 16;
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
- assert(space >= 0);
+ HDassert(space >= 0);
/*
* Create a dataset using the default dataset creation properties. We're
@@ -8368,7 +8374,7 @@ test_deprec(hid_t file)
* layout.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
/* Add the deflate filter, if available */
#if defined H5_HAVE_FILTER_DEFLATE
@@ -8404,7 +8410,7 @@ test_deprec(hid_t file)
csize[0] = dims[0] * 2;
csize[1] = dims[1] * 2;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
H5E_BEGIN_TRY
{
dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms);
@@ -8419,7 +8425,7 @@ test_deprec(hid_t file)
csize[0] = 5;
csize[1] = 100;
status = H5Pset_chunk(create_parms, 2, csize);
- assert(status >= 0);
+ HDassert(status >= 0);
if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms)) < 0)
goto error;
@@ -8444,11 +8450,11 @@ test_deprec(hid_t file)
* Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
- assert(create_parms >= 0);
+ HDassert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
- assert(status >= 0);
+ HDassert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- assert(status >= 0);
+ HDassert(status >= 0);
if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_COMPACT, H5T_NATIVE_DOUBLE, small_space, create_parms)) <
0)
@@ -12393,6 +12399,9 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
TESTING("Version 2 B-tree chunk index header flush dependencies handled correctly");
+ /* Initialize struct */
+ HDmemset(&info, 0, sizeof(info));
+
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
*/
@@ -15074,7 +15083,7 @@ main(void)
envval = "nomatch";
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
diff --git a/test/earray.c b/test/earray.c
index 8a8993c..fc0b87e 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Tuesday, June 17, 2008
*/
#include "h5test.h"
@@ -122,7 +122,7 @@ typedef struct earray_iter_t {
hsize_t cnt); /* Initialize/allocate iterator private info */
hssize_t (*next)(void *info); /* Get the next element to test */
hssize_t (*max_elem)(const void *info); /* Get the max. element set */
- int (*state)(void *_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
+ int (*state)(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
earray_state_t *state, hsize_t idx); /* Get the state of the extensible array */
herr_t (*term)(void *info); /* Shutdown/free iterator private info */
} earray_iter_t;
@@ -382,11 +382,6 @@ check_stats(const H5EA_t *ea, const earray_state_t *state)
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
-#ifdef QAK
- HDfprintf(stderr, "nelmts = %Hu, total EA size = %Hu\n", earray_stats.stored.nelmts,
- (earray_stats.computed.hdr_size + earray_stats.computed.index_blk_size +
- earray_stats.stored.super_blk_size + earray_stats.stored.data_blk_size));
-#endif /* QAK */
/* All tests passed */
return (0);
@@ -557,12 +552,6 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5EA_t *ea, haddr_t ea_addr)
if (H5EA_close(ea) < 0)
FAIL_STACK_ERROR
-#ifdef QAK
- HDfprintf(stderr, "ea_addr = %a\n", ea_addr);
- H5Fflush(file, H5F_SCOPE_GLOBAL);
- HDsystem("cp earray.h5 earray.h5.save");
-#endif /* QAK */
-
/* Delete array */
if (H5EA_delete(f, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
@@ -789,7 +778,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- puts(" Not tested when assertions are disabled");
+ HDputs(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -1326,9 +1315,9 @@ eiter_fw_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_para
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_fw_next(void *_eiter)
+eiter_fw_next(void *in_eiter)
{
- eiter_fw_t *eiter = (eiter_fw_t *)_eiter;
+ eiter_fw_t *eiter = (eiter_fw_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -1354,9 +1343,9 @@ eiter_fw_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_fw_max(const void *_eiter)
+eiter_fw_max(const void *in_eiter)
{
- const eiter_fw_t *eiter = (const eiter_fw_t *)_eiter;
+ const eiter_fw_t *eiter = (const eiter_fw_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1379,10 +1368,10 @@ eiter_fw_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_fw_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
+eiter_fw_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
earray_state_t *state, hsize_t idx)
{
- eiter_fw_t *eiter = (eiter_fw_t *)_eiter;
+ eiter_fw_t *eiter = (eiter_fw_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1407,21 +1396,8 @@ eiter_fw_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
/* (same eqn. as in H5EA__dblock_sblk_idx()) */
sblk_idx =
H5VM_log2_gen((uint64_t)(((idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
-#ifdef QAK
- HDfprintf(stderr, "idx = %Hu, tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx, sblk_idx,
- tparam->sblk_info[sblk_idx].ndblks, tparam->sblk_info[sblk_idx].dblk_nelmts,
- tparam->sblk_info[sblk_idx].start_idx, tparam->sblk_info[sblk_idx].start_dblk);
-#endif /* QAK */
-
- state->nelmts = EA_NELMTS(cparam, tparam, idx, sblk_idx);
-#ifdef QAK
- HDfprintf(stderr, "state->nelmts = %Hu\n", state->nelmts);
-#endif /* QAK */
-
+ state->nelmts = EA_NELMTS(cparam, tparam, idx, sblk_idx);
state->ndata_blks = EA_NDATA_BLKS(cparam, tparam, idx, sblk_idx);
-#ifdef QAK
- HDfprintf(stderr, "state->ndata_blks = %Hu\n", state->ndata_blks);
-#endif /* QAK */
/* Check if we have any super blocks yet */
if (tparam->sblk_info[sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) {
@@ -1430,9 +1406,6 @@ eiter_fw_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
eiter->base_sblk_idx = sblk_idx;
state->nsuper_blks = (sblk_idx - eiter->base_sblk_idx) + 1;
-#ifdef QAK
- HDfprintf(stderr, "state->nsuper_blks = %Hu\n", state->nsuper_blks);
-#endif /* QAK */
} /* end if */
else
state->nsuper_blks = 0;
@@ -1542,9 +1515,9 @@ eiter_rv_init(const H5EA_create_t *cparam, const earray_test_param_t *tparam, hs
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_rv_next(void *_eiter)
+eiter_rv_next(void *in_eiter)
{
- eiter_rv_t *eiter = (eiter_rv_t *)_eiter;
+ eiter_rv_t *eiter = (eiter_rv_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -1570,9 +1543,9 @@ eiter_rv_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_rv_max(const void *_eiter)
+eiter_rv_max(const void *in_eiter)
{
- const eiter_rv_t *eiter = (const eiter_rv_t *)_eiter;
+ const eiter_rv_t *eiter = (const eiter_rv_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1595,10 +1568,10 @@ eiter_rv_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_rv_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
+eiter_rv_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam,
earray_state_t *state, hsize_t idx)
{
- eiter_rv_t *eiter = (eiter_rv_t *)_eiter;
+ eiter_rv_t *eiter = (eiter_rv_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1641,40 +1614,18 @@ eiter_rv_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
loc_sblk_idx = H5VM_log2_gen(
(uint64_t)(((loc_idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
} /* end else */
-#ifdef QAK
- HDfprintf(
- stderr,
- "idx = %Hu, loc_idx = %Hu, eiter->max_sblk_idx = %u, idx_sblk_idx = %u, loc_sblk_idx = %u\n", idx,
- loc_idx, eiter->max_sblk_idx, idx_sblk_idx, loc_sblk_idx);
- HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx_sblk_idx,
- tparam->sblk_info[idx_sblk_idx].ndblks, tparam->sblk_info[idx_sblk_idx].dblk_nelmts,
- tparam->sblk_info[idx_sblk_idx].start_idx, tparam->sblk_info[idx_sblk_idx].start_dblk);
- HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", eiter->max_sblk_idx,
- tparam->sblk_info[eiter->max_sblk_idx].ndblks,
- tparam->sblk_info[eiter->max_sblk_idx].dblk_nelmts,
- tparam->sblk_info[eiter->max_sblk_idx].start_idx,
- tparam->sblk_info[eiter->max_sblk_idx].start_dblk);
-#endif /* QAK */
if (idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
idx_nelmts = (hsize_t)cparam->idx_blk_elmts;
else
idx_nelmts = EA_NELMTS(cparam, tparam, loc_idx, loc_sblk_idx);
state->nelmts = (eiter->max_nelmts - idx_nelmts) + cparam->idx_blk_elmts;
-#ifdef QAK
- HDfprintf(stderr, "eiter->max_nelmts = %Hu, idx_nelmts = %Hu, state->nelmts = %Hu\n",
- eiter->max_nelmts, idx_nelmts, state->nelmts);
-#endif /* QAK */
if (idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
idx_ndata_blks = 0;
else
idx_ndata_blks = EA_NDATA_BLKS(cparam, tparam, loc_idx, loc_sblk_idx);
state->ndata_blks = eiter->max_ndata_blks - idx_ndata_blks;
-#ifdef QAK
- HDfprintf(stderr, "eiter->max_ndata_blks = %Hu, idx_ndata_blks = %Hu, state->ndata_blks = %Hu\n",
- eiter->max_ndata_blks, idx_ndata_blks, state->ndata_blks);
-#endif /* QAK */
/* Check if we have any super blocks yet */
if (tparam->sblk_info[eiter->max_sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) {
@@ -1682,10 +1633,6 @@ eiter_rv_state(void *_eiter, const H5EA_create_t *cparam, const earray_test_para
state->nsuper_blks = (eiter->max_sblk_idx - idx_sblk_idx) + 1;
else
state->nsuper_blks = (eiter->max_sblk_idx - eiter->idx_blk_nsblks) + 1;
-#ifdef QAK
- HDfprintf(stderr, "eiter->idx_blk_nsblks = %Hu, state->nsuper_blks = %Hu\n",
- eiter->idx_blk_nsblks, state->nsuper_blks);
-#endif /* QAK */
} /* end if */
} /* end else */
@@ -1798,9 +1745,9 @@ eiter_rnd_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_rnd_next(void *_eiter)
+eiter_rnd_next(void *in_eiter)
{
- eiter_rnd_t *eiter = (eiter_rnd_t *)_eiter;
+ eiter_rnd_t *eiter = (eiter_rnd_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -1831,9 +1778,9 @@ eiter_rnd_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_rnd_max(const void *_eiter)
+eiter_rnd_max(const void *in_eiter)
{
- const eiter_rnd_t *eiter = (const eiter_rnd_t *)_eiter;
+ const eiter_rnd_t *eiter = (const eiter_rnd_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -1856,9 +1803,9 @@ eiter_rnd_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_rnd_term(void *_eiter)
+eiter_rnd_term(void *in_eiter)
{
- eiter_rnd_t *eiter = (eiter_rnd_t *)_eiter;
+ eiter_rnd_t *eiter = (eiter_rnd_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -2012,9 +1959,9 @@ eiter_cyc_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par
*-------------------------------------------------------------------------
*/
static hssize_t
-eiter_cyc_next(void *_eiter)
+eiter_cyc_next(void *in_eiter)
{
- eiter_cyc_t *eiter = (eiter_cyc_t *)_eiter;
+ eiter_cyc_t *eiter = (eiter_cyc_t *)in_eiter;
hssize_t ret_val;
/* Sanity check */
@@ -2047,9 +1994,9 @@ eiter_cyc_next(void *_eiter)
*-------------------------------------------------------------------------
*/
static H5_ATTR_PURE hssize_t
-eiter_cyc_max(const void *_eiter)
+eiter_cyc_max(const void *in_eiter)
{
- const eiter_cyc_t *eiter = (const eiter_cyc_t *)_eiter;
+ const eiter_cyc_t *eiter = (const eiter_cyc_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -2072,9 +2019,9 @@ eiter_cyc_max(const void *_eiter)
*-------------------------------------------------------------------------
*/
static int
-eiter_cyc_term(void *_eiter)
+eiter_cyc_term(void *in_eiter)
{
- eiter_cyc_t *eiter = (eiter_cyc_t *)_eiter;
+ eiter_cyc_t *eiter = (eiter_cyc_t *)in_eiter;
/* Sanity check */
HDassert(eiter);
@@ -2505,12 +2452,12 @@ main(void)
switch (curr_test) {
/* "Normal" testing parameters */
case EARRAY_TEST_NORMAL:
- puts("Testing with normal parameters");
+ HDputs("Testing with normal parameters");
break;
/* "Re-open array" testing parameters */
case EARRAY_TEST_REOPEN:
- puts("Testing with reopen array flag set");
+ HDputs("Testing with reopen array flag set");
tparam.reopen_array = EARRAY_TEST_REOPEN;
break;
@@ -2539,31 +2486,31 @@ main(void)
switch (curr_iter) {
/* "Forward" testing parameters */
case EARRAY_ITER_FW:
- puts("Testing with forward iteration");
+ HDputs("Testing with forward iteration");
tparam.eiter = &ea_iter_fw;
break;
/* "Reverse" testing parameters */
case EARRAY_ITER_RV:
- puts("Testing with reverse iteration");
+ HDputs("Testing with reverse iteration");
tparam.eiter = &ea_iter_rv;
break;
/* "Random" testing parameters */
case EARRAY_ITER_RND:
- puts("Testing with random iteration");
+ HDputs("Testing with random iteration");
tparam.eiter = &ea_iter_rnd;
break;
/* "Random #2" testing parameters */
case EARRAY_ITER_RND2:
- puts("Testing with random #2 iteration");
+ HDputs("Testing with random #2 iteration");
tparam.eiter = &ea_iter_rnd2;
break;
/* "Cyclic" testing parameters */
case EARRAY_ITER_CYC:
- puts("Testing with cyclic iteration");
+ HDputs("Testing with cyclic iteration");
tparam.eiter = &ea_iter_cyc;
break;
@@ -2630,7 +2577,7 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -2653,7 +2600,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return 1;
} /* end main() */
diff --git a/test/efc.c b/test/efc.c
index 1e702aa..e61eb1b 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -2704,7 +2704,7 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -2731,7 +2731,7 @@ error:
H5E_END_TRY
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
for (i = 0; i < N_FILENAMES; i++) {
HDfree(filename[i]);
diff --git a/test/farray.c b/test/farray.c
index 6ce534d..81f839f 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -492,7 +492,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
}
#else /* NDEBUG */
SKIPPED();
- puts(" Not tested when assertions are disabled");
+ HDputs(" Not tested when assertions are disabled");
#endif /* NDEBUG */
/*
@@ -1782,7 +1782,7 @@ main(void)
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -1805,7 +1805,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index 2c888a2..e8cde89 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Friday, February 24, 2006
*/
#include "h5test.h"
@@ -20,9 +20,9 @@
* This file needs to access private datatypes from the H5HF package.
* This file also needs to access the fractal heap testing code.
*/
-#define H5HF_FRIEND /*suppress error about including H5HFpkg */
+#define H5HF_FRIEND /*suppress error about including H5HFpkg */
#define H5HF_TESTING
-#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5HFpkg.h" /* Fractal heaps */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
@@ -30,9 +30,9 @@
/* Other private headers that this test requires */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Max. testfile name length */
#define FHEAP_FILENAME_LEN 1024
@@ -17061,7 +17061,7 @@ main(void)
TEST_ERROR
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -17087,7 +17087,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return 1;
} /* end main() */
diff --git a/test/freespace.c b/test/freespace.c
index 00b76b2..52fd097 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -2902,7 +2902,7 @@ main(void)
HDputs("All free-space tests passed.");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -2918,7 +2918,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
} /* main() */
diff --git a/test/gheap.c b/test/gheap.c
index 64117f3..95594ee 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Purpose: Tests the global heap. The global heap is the set of all
@@ -42,9 +42,9 @@
nerrors++; \
if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \
H5_FAILED(); \
- puts(MSG); \
+ HDputs(MSG); \
if (nerrors == GHEAP_REPEATED_ERR_LIM) \
- puts(" Suppressing further errors..."); \
+ HDputs(" Suppressing further errors..."); \
} /* end if */ \
} /* end GHEAP_REPEATED_ERR */
@@ -129,7 +129,7 @@ test_1(hid_t fapl)
HDputs(" Unable to read object");
nerrors++;
}
- else if (HDmemcmp(in, out, size)) {
+ else if (HDmemcmp(in, out, size) != 0) {
H5_FAILED();
HDputs(" Value read doesn't match value written");
nerrors++;
@@ -229,7 +229,7 @@ test_2(hid_t fapl)
HDputs(" Unable to read object");
nerrors++;
}
- else if (memcmp(in, out, size)) {
+ else if (HDmemcmp(in, out, size) != 0) {
H5_FAILED();
HDputs(" Value read doesn't match value written");
nerrors++;
@@ -604,7 +604,7 @@ main(void)
HDputs("All global heap tests passed.");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -619,7 +619,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
HDputs("*** TESTS FAILED ***");
HDexit(EXIT_FAILURE);
diff --git a/test/lheap.c b/test/lheap.c
index 8b522fe..9bbacbe 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Purpose: Test local heaps used by symbol tables (groups).
@@ -103,7 +103,7 @@ main(void)
if (j > 4)
buf[j] = '\0';
- if (UFAIL == (obj[i] = H5HL_insert(f, heap, strlen(buf) + 1, buf))) {
+ if (UFAIL == (obj[i] = H5HL_insert(f, heap, HDstrlen(buf) + 1, buf))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -155,7 +155,7 @@ main(void)
goto error;
}
- if (strcmp(s, buf)) {
+ if (HDstrcmp(s, buf) != 0) {
H5_FAILED();
HDprintf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
HDprintf(" got: \"%s\"\n", s);
@@ -201,7 +201,7 @@ main(void)
TEST_ERROR
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -219,7 +219,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return EXIT_FAILURE;
}
diff --git a/test/mf.c b/test/mf.c
index 910fd7c..c53b6f1 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -9242,7 +9242,7 @@ main(void)
h5_cleanup(FILENAME, fapl);
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -9262,7 +9262,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return (1);
} /* main() */
diff --git a/test/ohdr.c b/test/ohdr.c
index 9235f5a..7801b7a 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Tuesday, November 24, 1998
*/
#include "h5test.h"
@@ -788,7 +788,7 @@ count_attributes(hid_t dset_id)
* On success, stores size in `size_out` pointer.
*/
static herr_t
-_oh_getsize(hid_t did, hsize_t *size_out)
+oh_getsize(hid_t did, hsize_t *size_out)
{
H5O_native_info_t ninfo;
@@ -811,9 +811,9 @@ oh_compare(hid_t did1, hid_t did2)
hsize_t space1 = 0;
hsize_t space2 = 0;
- if (FAIL == _oh_getsize(did1, &space1))
+ if (FAIL == oh_getsize(did1, &space1))
return -1;
- if (FAIL == _oh_getsize(did2, &space2))
+ if (FAIL == oh_getsize(did2, &space2))
return -2;
if (space1 < space2)
@@ -915,7 +915,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf))
+ if (HDstrcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* modify the string attribute */
@@ -930,7 +930,7 @@ test_minimized_dset_ohdr_attribute_addition(hid_t fapl_id)
/* Read the data back and verify */
if (H5Aread(aid, H5T_NATIVE_CHAR, out_buf) < 0)
TEST_ERROR;
- if (HDstrcmp(in_buf, out_buf))
+ if (HDstrcmp(in_buf, out_buf) != 0)
TEST_ERROR;
/* Close */
@@ -1761,8 +1761,8 @@ main(void)
env_h5_drvr = "nomatch";
/* Check for VFD which stores data in multiple files */
- single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ single_file_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
/* Reset library */
h5_reset();
@@ -2034,7 +2034,7 @@ main(void)
TEST_ERROR
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -2051,7 +2051,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
return 1;
} /* end main() */
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 1d5d893..f21c568 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -4182,7 +4182,7 @@ main(void)
goto error;
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -4200,8 +4200,7 @@ error:
H5E_END_TRY;
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
-
} /* main() */
diff --git a/test/unregister.c b/test/unregister.c
index c6da4df..803f8373 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -301,7 +301,7 @@ main(void)
HDprintf("All filter unregistration tests passed.\n");
/* Pop API context */
- if (api_ctx_pushed && H5CX_pop() < 0)
+ if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
FAIL_STACK_ERROR
api_ctx_pushed = FALSE;
@@ -312,7 +312,7 @@ error:
HDprintf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
HDexit(EXIT_FAILURE);
} /* end main() */
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index c73d032..a8b6d47 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -1253,7 +1253,7 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%ld).\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, FUNC,
actual_total_reads, total_reads);
}
}
@@ -1263,7 +1263,7 @@ reset_server_counters(void)
success = FALSE;
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%ld).\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, FUNC,
actual_total_writes, total_writes);
}
}
@@ -1661,7 +1661,7 @@ serve_write_request(struct mssg_t *mssg_ptr)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: data[i].len = %Zu != mssg->len = %d.\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC,
data[target_index].len, mssg_ptr->len);
}
}
@@ -1790,11 +1790,11 @@ serve_total_writes_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request total writes %ld.\n", (int)(mssg_ptr->src), total_writes);
+ HDfprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes);
}
else {
- HDfprintf(stdout, "%d request total writes %ld -- FAILED.\n", (int)(mssg_ptr->src), total_writes);
+ HDfprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes);
}
}
@@ -1860,11 +1860,11 @@ serve_total_reads_request(struct mssg_t *mssg_ptr)
if (success) {
- HDfprintf(stdout, "%d request total reads %ld.\n", (int)(mssg_ptr->src), total_reads);
+ HDfprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads);
}
else {
- HDfprintf(stdout, "%d request total reads %ld -- FAILED.\n", (int)(mssg_ptr->src), total_reads);
+ HDfprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads);
}
}
@@ -4181,7 +4181,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr)
}
/* Pop API context */
- H5CX_pop();
+ H5CX_pop(FALSE);
if (success) {
@@ -4393,7 +4393,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%ld/%ld).\n", world_mpi_rank,
+ HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank,
FUNC, (long long)addr, reported_entry_writes, expected_entry_writes);
}
}
@@ -4485,8 +4485,8 @@ verify_total_reads(int expected_total_reads)
nerrors++;
success = FALSE;
if (verbose) {
- HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%ld).\n",
- world_mpi_rank, FUNC, reported_total_reads, expected_total_reads);
+ HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank,
+ FUNC, reported_total_reads, expected_total_reads);
}
}
}
@@ -6513,15 +6513,15 @@ trace_file_check(int metadata_write_strategy)
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
FUNC, i);
if (expected_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC,
"<EMPTY>", expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer,
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer,
actual_line_len);
}
if (actual_line_len == 0) {
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC,
(*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC,
"<EMPTY>", actual_line_len);
}
}
@@ -6537,9 +6537,9 @@ trace_file_check(int metadata_write_strategy)
if (verbose) {
HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank,
FUNC, i);
- HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC,
+ HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC,
(*expected_output)[i], expected_line_len);
- HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer,
+ HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer,
actual_line_len);
}
}
@@ -6868,28 +6868,20 @@ main(int argc, char **argv)
* hang in the atexit post processing in which it may try to make MPI
* calls. By then, MPI calls may not work.
*/
- if (H5dont_atexit() < 0) {
+ if (H5dont_atexit() < 0)
HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank);
- };
+
H5open();
express_test = do_express_test();
-#if 0 /* JRM */
- express_test = 0;
-#endif /* JRM */
- if (express_test) {
-
+ if (express_test)
virt_num_data_entries = EXPRESS_VIRT_NUM_DATA_ENTRIES;
- }
- else {
-
+ else
virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES;
- }
#ifdef H5_HAVE_MPE
- if (MAINPROCESS) {
+ if (MAINPROCESS)
HDprintf(" Tests compiled for MPE.\n");
- }
virt_num_data_entries = MPE_VIRT_NUM_DATA_ENTIES;
#endif /* H5_HAVE_MPE */
@@ -6902,11 +6894,8 @@ main(int argc, char **argv)
}
if (mpi_size < 3) {
-
- if (MAINPROCESS) {
-
+ if (MAINPROCESS)
HDprintf(" Need at least 3 processes. Exiting.\n");
- }
goto finish;
}
@@ -6924,27 +6913,22 @@ main(int argc, char **argv)
/* setup file access property list with the world communicator */
if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) {
nerrors++;
- if (verbose) {
+ if (verbose)
HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, FUNC);
- }
}
if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) {
-
nerrors++;
- if (verbose) {
+ if (verbose)
HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, FUNC);
- }
}
/* fix the file names */
for (u = 0; u < sizeof(FILENAME) / sizeof(FILENAME[0]) - 1; ++u) {
if (h5_fixname(FILENAME[u], fapl, filenames[u], sizeof(filenames[u])) == NULL) {
-
nerrors++;
- if (verbose) {
+ if (verbose)
HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, FUNC);
- }
break;
}
}
@@ -6952,9 +6936,8 @@ main(int argc, char **argv)
/* close the fapl before we set it up again */
if (H5Pclose(fapl) < 0) {
nerrors++;
- if (verbose) {
+ if (verbose)
HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, FUNC);
- }
}
/* now create the fapl again, excluding the server process. */
@@ -6963,32 +6946,25 @@ main(int argc, char **argv)
/* setup file access property list */
if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) {
nerrors++;
- if (verbose) {
+ if (verbose)
HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, FUNC);
- }
}
if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) {
-
nerrors++;
- if (verbose) {
+ if (verbose)
HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, FUNC);
- }
}
}
setup_rand();
max_nerrors = get_max_nerrors();
-
if (max_nerrors != 0) {
/* errors in setup -- no point in continuing */
-
- if (world_mpi_rank == 0) {
-
+ if (world_mpi_rank == 0)
HDfprintf(stdout, "Errors in test initialization. Exiting.\n");
- }
goto finish;
}
diff --git a/testpar/t_file.c b/testpar/t_file.c
index d948804..ec8726f 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -288,7 +288,7 @@ test_page_buffer_access(void)
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop();
+ ret = H5CX_pop(FALSE);
VRFY((ret == 0), "H5CX_pop()");
api_ctx_pushed = FALSE;
}
@@ -422,7 +422,7 @@ test_page_buffer_access(void)
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop();
+ ret = H5CX_pop(FALSE);
VRFY((ret == 0), "H5CX_pop()");
api_ctx_pushed = FALSE;
}
@@ -579,7 +579,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop();
+ ret = H5CX_pop(FALSE);
VRFY((ret == 0), "H5CX_pop()");
api_ctx_pushed = FALSE;
}
@@ -743,7 +743,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
/* Pop API context */
if (api_ctx_pushed) {
- ret = H5CX_pop();
+ ret = H5CX_pop(FALSE);
VRFY((ret == 0), "H5CX_pop()");
api_ctx_pushed = FALSE;
}
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index b38c92f..ae5b0e5 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -15,7 +15,7 @@
*
* Created: debug.c
* Jul 18 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Debugs an existing HDF5 file at a low level.
*
@@ -67,7 +67,6 @@
* Return: Non-NULL on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -149,7 +148,6 @@ get_H5B2_class(const uint8_t *sig)
* Return: Non-NULL on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -191,7 +189,6 @@ get_H5EA_class(const uint8_t *sig)
* Return: Non-NULL on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -233,7 +230,6 @@ get_H5FA_class(const uint8_t *sig)
* Failure: exit (non-zero)
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -250,8 +246,8 @@ main(int argc, char *argv[])
haddr_t extra[10];
uint8_t sig[H5F_SIGNATURE_LEN];
size_t u;
- H5E_auto2_t func;
- void * edata;
+ H5E_auto2_t func = NULL;
+ void * edata = NULL;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t status = SUCCEED;
int exit_value = 0;
@@ -825,7 +821,7 @@ done:
/* Pop API context */
if (api_ctx_pushed)
- H5CX_pop();
+ H5CX_pop(FALSE);
H5Eset_auto2(H5E_DEFAULT, func, edata);