summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-20 05:48:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-20 05:48:09 (GMT)
commit0fcfcf0fa4c1fe58301f3fe42f9b887bddf79ed1 (patch)
tree1313736c19058b1bc5cf0ba6a28f31113d33195e /src
parent15bc329ddb8fb9c5d3bcd9869a384f813e7d21b2 (diff)
downloadhdf5-0fcfcf0fa4c1fe58301f3fe42f9b887bddf79ed1.zip
hdf5-0fcfcf0fa4c1fe58301f3fe42f9b887bddf79ed1.tar.gz
hdf5-0fcfcf0fa4c1fe58301f3fe42f9b887bddf79ed1.tar.bz2
[svn-r13773] Description:
Reduce compiler warnings w/gcc 4.2 Tested on: FreeBSD/32 6.2 (duty) w/gcc 4.2
Diffstat (limited to 'src')
-rw-r--r--src/H5B.c66
-rw-r--r--src/H5B2.c44
-rw-r--r--src/H5B2cache.c28
-rw-r--r--src/H5B2dbg.c14
-rw-r--r--src/H5B2int.c90
-rw-r--r--src/H5B2stat.c4
-rw-r--r--src/H5B2test.c8
-rw-r--r--src/H5Bcache.c8
-rw-r--r--src/H5D.c70
-rw-r--r--src/H5L.c17
10 files changed, 174 insertions, 175 deletions
diff --git a/src/H5B.c b/src/H5B.c
index ddf4fc5..723d4e8 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -236,7 +236,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
bt->nchildren = 0;
if((bt->rc_shared=(type->get_shared)(f, udata))==NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't retrieve B-tree node buffer")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
if (NULL==(bt->native=H5FL_BLK_MALLOC(native_block,shared->sizeof_keys)) ||
NULL==(bt->child=H5FL_SEQ_MALLOC(haddr_t,(size_t)shared->two_k)))
@@ -318,9 +318,9 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u
* Perform a binary search to locate the child which contains
* the thing for which we're searching.
*/
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree node")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
rt = bt->nchildren;
@@ -444,12 +444,12 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_t *old_bt, unsigned *old_bt_flags,
/*
* Initialize variables.
*/
- shared=H5RC_GET_OBJ(old_bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(old_bt->rc_shared);
HDassert(shared);
assert(old_bt->nchildren == shared->two_k);
/* Get the dataset transfer property list */
- if (NULL == (dx_plist = H5I_object(dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Get B-tree split ratios */
@@ -507,7 +507,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_t *old_bt, unsigned *old_bt_flags,
*/
if (H5B_create(f, dxpl_id, shared->type, udata, new_addr_p/*out*/) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree")
- if (NULL==(new_bt=H5AC_protect(f, dxpl_id, H5AC_BT, *new_addr_p, shared->type, udata, H5AC_WRITE)))
+ if (NULL==(new_bt=(H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, *new_addr_p, shared->type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to protect B-tree")
new_bt->level = old_bt->level;
@@ -547,7 +547,7 @@ H5B_split(H5F_t *f, hid_t dxpl_id, H5B_t *old_bt, unsigned *old_bt_flags,
if (H5F_addr_defined(old_bt->right)) {
H5B_t *tmp_bt;
- if (NULL == (tmp_bt = H5AC_protect(f, dxpl_id, H5AC_BT, old_bt->right, shared->type, udata, H5AC_WRITE)))
+ if (NULL == (tmp_bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, old_bt->right, shared->type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load right sibling")
tmp_bt->left = *new_addr_p;
@@ -638,9 +638,9 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
assert(H5B_INS_RIGHT == my_ins);
/* the current root */
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to locate root of B-tree")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
level = bt->level;
@@ -653,7 +653,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
bt = NULL;
/* the new node */
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, child, type, udata, H5AC_READ)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child, type, udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load new node")
if (!rt_key_changed)
@@ -673,7 +673,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate file space to move root")
/* update the new child's left pointer */
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, child, type, udata, H5AC_WRITE)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, child, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load new child")
bt->left = old_root;
@@ -687,7 +687,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
* at the new location -QAK
*/
/* Bring the old root into the cache if it's not already */
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load new child")
/* Make certain the old root info is marked as dirty before moving it, */
@@ -778,7 +778,7 @@ H5B_insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
assert(bt);
assert(bt_flags);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
assert(bt->nchildren<shared->two_k);
@@ -917,9 +917,9 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* data. When the search completes IDX points to the child that
* should get the new data.
*/
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to load node")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
rt = bt->nchildren;
@@ -1088,7 +1088,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
if (bt->nchildren == shared->two_k) {
if (H5B_split(f, dxpl_id, bt, &bt_flags, addr, idx, udata, new_node_p/*out*/)<0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node")
- if (NULL == (twin = H5AC_protect(f, dxpl_id, H5AC_BT, *new_node_p, type, udata, H5AC_WRITE)))
+ if (NULL == (twin = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, *new_node_p, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to load node")
if (idx<bt->nchildren) {
tmp_bt = bt;
@@ -1189,7 +1189,7 @@ H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, H5B_operator_t op,
HDassert(udata);
/* Protect the initial/current node */
- if(NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
+ if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree node")
if(bt->level > 0) {
@@ -1226,7 +1226,7 @@ H5B_iterate(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, H5B_operator_t op,
/* Protect the next node to the right, if there is one */
if(H5F_addr_defined(bt->right)) {
next_addr = bt->right;
- if(NULL == (next_bt = H5AC_protect(f, dxpl_id, H5AC_BT, next_addr, type, udata, H5AC_READ)))
+ if(NULL == (next_bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, next_addr, type, udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "B-tree node")
} /* end if */
else {
@@ -1320,9 +1320,9 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* Perform a binary search to locate the child which contains the thing
* for which we're searching.
*/
- if (NULL==(bt=H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
+ if (NULL==(bt=(H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to load B-tree node")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
rt = bt->nchildren;
@@ -1402,7 +1402,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
*/
if (ret_value!=H5B_INS_REMOVE && level>0) {
if (H5F_addr_defined(bt->right)) {
- if (NULL == (sibling = H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE)))
+ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to unlink node from tree")
/* Make certain the native key for the right sibling is set up */
@@ -1431,7 +1431,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
bt->nchildren = 0;
if (level>0) {
if (H5F_addr_defined(bt->left)) {
- if (NULL == (sibling = H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, type, udata, H5AC_WRITE)))
+ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->left, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to load node from tree")
sibling->right = bt->right;
@@ -1442,7 +1442,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
sibling=NULL; /* Make certain future references will be caught */
}
if (H5F_addr_defined(bt->right)) {
- if (NULL == (sibling = H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE)))
+ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to unlink node from tree")
/* Copy left-most key from deleted node to left-most key in it's right neighbor */
@@ -1507,7 +1507,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
*/
if (level>0) {
if (H5F_addr_defined(bt->right)) {
- if (NULL == (sibling = H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE)))
+ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, bt->right, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, H5B_INS_ERROR, "unable to unlink node from tree")
HDmemcpy(H5B_NKEY(sibling,shared,0), H5B_NKEY(bt,shared,bt->nchildren), type->sizeof_nkey);
@@ -1607,7 +1607,7 @@ H5B_remove(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
* If the B-tree is now empty then make sure we mark the root node as
* being at level zero
*/
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree root node")
if (0==bt->nchildren && 0!=bt->level) {
@@ -1663,9 +1663,9 @@ H5B_delete(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void
assert(H5F_addr_defined(addr));
/* Lock this B-tree node into memory for now */
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree node")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
/* Iterate over all children in tree, deleting them */
@@ -1789,7 +1789,7 @@ H5B_copy(const H5B_t *old_bt)
* Check arguments.
*/
assert(old_bt);
- shared=H5RC_GET_OBJ(old_bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(old_bt->rc_shared);
HDassert(shared);
/* Allocate memory for the new H5B_t object */
@@ -1866,9 +1866,9 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
/*
* Load the tree node.
*/
- if (NULL == (bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
+ if (NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree node")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
/*
@@ -1986,9 +1986,9 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
}
}
/* Initialize the queue */
- bt = H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ);
+ bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ);
assert(bt);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
cur = H5MM_calloc(sizeof(struct child_t));
assert (cur);
@@ -2007,7 +2007,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
* test.
*/
for (ncell = 0; cur; ncell++) {
- bt = H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, type, udata, H5AC_READ);
+ bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, type, udata, H5AC_READ);
assert(bt);
/* Check node header */
diff --git a/src/H5B2.c b/src/H5B2.c
index b52b215..88d0a9b 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -180,11 +180,11 @@ H5B2_insert(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(H5F_addr_defined(addr));
/* Look up the b-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Check if the root node is allocated yet */
@@ -263,7 +263,7 @@ H5B2_iterate(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(op);
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Safely grab pointer to reference counted shared B-tree info, so we can release the B-tree header if necessary */
@@ -272,7 +272,7 @@ H5B2_iterate(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
incr_rc = TRUE;
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Make copy of the root node pointer */
@@ -347,7 +347,7 @@ H5B2_find(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(H5F_addr_defined(addr));
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Safely grab pointer to reference counted shared B-tree info, so we can release the B-tree header if necessary */
@@ -356,7 +356,7 @@ H5B2_find(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
incr_rc = TRUE;
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Make copy of the root node pointer to start search with */
@@ -425,7 +425,7 @@ H5B2_find(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
+ if(NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate record */
@@ -510,7 +510,7 @@ H5B2_index(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(op);
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Safely grab pointer to reference counted shared B-tree info, so we can release the B-tree header if necessary */
@@ -519,7 +519,7 @@ H5B2_index(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
incr_rc = TRUE;
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Make copy of the root node pointer to start search with */
@@ -624,7 +624,7 @@ H5B2_index(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
+ if(NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Sanity check index */
@@ -683,11 +683,11 @@ H5B2_remove(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(H5F_addr_defined(addr));
/* Look up the b-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Check for empty B-tree */
@@ -766,11 +766,11 @@ H5B2_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
HDassert(H5F_addr_defined(addr));
/* Look up the b-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Check for empty B-tree */
@@ -855,7 +855,7 @@ H5B2_get_nrec(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(nrec);
/* Look up the B-tree header */
- if (NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if (NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get B-tree number of records */
@@ -912,11 +912,11 @@ H5B2_neighbor(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(op);
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Check for empty tree */
@@ -980,11 +980,11 @@ H5B2_delete(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(H5F_addr_defined(addr));
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Delete all nodes in B-tree */
@@ -1048,7 +1048,7 @@ H5B2_modify(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
HDassert(op);
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Safely grab pointer to reference counted shared B-tree info, so we can release the B-tree header if necessary */
@@ -1057,7 +1057,7 @@ H5B2_modify(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
incr_rc = TRUE;
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(bt2_shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Make copy of the root node pointer to start search with */
@@ -1137,7 +1137,7 @@ H5B2_modify(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr,
hbool_t changed = FALSE;/* Whether the 'modify' callback changed the record */
/* Lock B-tree leaf node */
- if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_WRITE)))
+ if (NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate record */
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 987c6a6..f081ae8 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -231,7 +231,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, vo
done:
if(buf)
- H5FL_BLK_FREE(header_block, buf);
+ (void)H5FL_BLK_FREE(header_block, buf);
if(!ret_value && bt2)
(void)H5B2_cache_hdr_dest(f, bt2);
@@ -277,7 +277,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B
uint32_t metadata_chksum; /* Computed metadata checksum value */
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Compute the size of the B-tree header on disk */
@@ -328,7 +328,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B
if(H5F_block_write(f, H5FD_MEM_BTREE, addr, size, dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree header to disk")
- H5FL_BLK_FREE(header_block, buf);
+ (void)H5FL_BLK_FREE(header_block, buf);
bt2->cache_info.is_dirty = FALSE;
} /* end if */
@@ -491,7 +491,7 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_uda
H5RC_INC(internal->shared);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(internal->shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Read header from disk */
@@ -514,11 +514,11 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_uda
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree type")
/* Allocate space for the native keys in memory */
- if((internal->int_native = H5FL_FAC_MALLOC(shared->node_info[udata->depth].nat_rec_fac)) == NULL)
+ if((internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(shared->node_info[udata->depth].nat_rec_fac)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree internal native keys")
/* Allocate space for the node pointers in memory */
- if((internal->node_ptrs = H5FL_FAC_MALLOC(shared->node_info[udata->depth].node_ptr_fac)) == NULL)
+ if((internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(shared->node_info[udata->depth].node_ptr_fac)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree internal node pointers")
/* Set the number of records in the leaf & it's depth */
@@ -614,7 +614,7 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr
unsigned u; /* Local index variable */
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(internal->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
p = shared->page;
@@ -704,7 +704,7 @@ H5B2_cache_internal_dest(H5F_t UNUSED *f, H5B2_internal_t *internal)
HDassert(internal);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(internal->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Release internal node's native key buffer */
@@ -790,7 +790,7 @@ H5B2_cache_internal_size(const H5F_t UNUSED *f, const H5B2_internal_t *internal,
HDassert(size_ptr);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(internal->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Set size value */
@@ -845,7 +845,7 @@ H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_nrec, v
H5RC_INC(leaf->shared);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(leaf->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(leaf->shared);
HDassert(shared);
/* Read header from disk */
@@ -868,7 +868,7 @@ H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_nrec, v
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree type")
/* Allocate space for the native keys in memory */
- if((leaf->leaf_native = H5FL_FAC_MALLOC(shared->node_info[0].nat_rec_fac)) == NULL)
+ if((leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(shared->node_info[0].nat_rec_fac)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for B-tree leaf native keys")
/* Set the number of records in the leaf */
@@ -949,7 +949,7 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5
unsigned u; /* Local index variable */
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(leaf->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(leaf->shared);
HDassert(shared);
p = shared->page;
@@ -1026,7 +1026,7 @@ H5B2_cache_leaf_dest(H5F_t UNUSED *f, H5B2_leaf_t *leaf)
HDassert(leaf);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(leaf->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(leaf->shared);
HDassert(shared);
/* Release leaf's native key buffer */
@@ -1108,7 +1108,7 @@ H5B2_cache_leaf_size(const H5F_t UNUSED *f, const H5B2_leaf_t *leaf, size_t *siz
HDassert(size_ptr);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(leaf->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(leaf->shared);
HDassert(shared);
/* Set size value */
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index eb8d209..836486e 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -111,11 +111,11 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Load the B-tree header.
*/
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Print opening message */
@@ -223,11 +223,11 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Load the B-tree header.
*/
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/*
@@ -352,17 +352,17 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Load the B-tree header.
*/
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, hdr_addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/*
* Load the B-tree leaf node
*/
- if(NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, addr, &nrec, bt2->shared, H5AC_READ)))
+ if(NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, addr, &nrec, bt2->shared, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree leaf node")
/* Release the B-tree header */
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 4adb207..615f8cd 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -265,7 +265,7 @@ H5B2_shared_free(void *_shared)
/* Free the B-tree node buffer */
if(shared->page)
- H5FL_BLK_FREE(node_page, shared->page);
+ (void)H5FL_BLK_FREE(node_page, shared->page);
/* Free the array of offsets into the native key block */
if(shared->nat_off)
@@ -381,7 +381,7 @@ H5B2_split1(H5F_t *f, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_
HDassert(internal_flags_ptr);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(internal->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Slide records in parent node up one space, to make room for promoted record */
@@ -434,9 +434,9 @@ H5B2_split1(H5F_t *f, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_
right_addr = internal->node_ptrs[idx + 1].addr;
/* Protect both leafs */
- if(NULL == (left_leaf = H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ if(NULL == (left_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if(NULL == (right_leaf = H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx + 1].node_nrec), internal->shared, H5AC_WRITE)))
+ if(NULL == (right_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx + 1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* More setup for child nodes */
@@ -560,7 +560,7 @@ H5B2_split_root(H5F_t *f, hid_t dxpl_id, H5B2_t *bt2, unsigned *bt2_flags_ptr)
HDassert(bt2_flags_ptr);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
HDassert(shared);
/* Update depth of B-tree */
@@ -644,7 +644,7 @@ H5B2_redistribute2(H5F_t *f, hid_t dxpl_id, unsigned depth, H5B2_internal_t *int
HDassert(internal);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(internal->shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Check for the kind of B-tree node to redistribute */
@@ -683,9 +683,9 @@ H5B2_redistribute2(H5F_t *f, hid_t dxpl_id, unsigned depth, H5B2_internal_t *int
right_addr = internal->node_ptrs[idx+1].addr;
/* Lock left & right B-tree child nodes */
- if (NULL == (left_leaf = H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (left_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if (NULL == (right_leaf = H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (right_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* More setup for child nodes */
@@ -874,7 +874,7 @@ H5B2_redistribute3(H5F_t *f, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(internal->shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Check for the kind of B-tree node to redistribute */
@@ -923,11 +923,11 @@ H5B2_redistribute3(H5F_t *f, hid_t dxpl_id, unsigned depth,
right_addr = internal->node_ptrs[idx+1].addr;
/* Lock B-tree child nodes */
- if (NULL == (left_leaf = H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx-1].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (left_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx-1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if (NULL == (middle_leaf = H5AC_protect(f, dxpl_id, child_class, middle_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (middle_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, middle_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if (NULL == (right_leaf = H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (right_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* More setup for child nodes */
@@ -1244,7 +1244,7 @@ H5B2_merge2(H5F_t *f, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(internal->shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Check for the kind of B-tree node to split */
@@ -1283,9 +1283,9 @@ H5B2_merge2(H5F_t *f, hid_t dxpl_id, unsigned depth,
right_addr = internal->node_ptrs[idx+1].addr;
/* Lock left & right B-tree child nodes */
- if(NULL == (left_leaf = H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ if(NULL == (left_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if(NULL == (right_leaf = H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
+ if(NULL == (right_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* More setup for accessing child node information */
@@ -1404,7 +1404,7 @@ H5B2_merge3(H5F_t *f, hid_t dxpl_id, unsigned depth,
HDassert(internal_flags_ptr);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(internal->shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Check for the kind of B-tree node to split */
@@ -1453,11 +1453,11 @@ H5B2_merge3(H5F_t *f, hid_t dxpl_id, unsigned depth,
right_addr = internal->node_ptrs[idx+1].addr;
/* Lock B-tree child nodes */
- if (NULL == (left_leaf = H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx-1].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (left_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx-1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if (NULL == (middle_leaf = H5AC_protect(f, dxpl_id, child_class, middle_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (middle_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, middle_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
- if (NULL == (right_leaf = H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (right_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* More setup for accessing child node information */
@@ -1619,7 +1619,7 @@ H5B2_swap_leaf(H5F_t *f, hid_t dxpl_id, unsigned depth,
HDassert(idx <= internal->nrec);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(internal->shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Check for the kind of B-tree node to swap */
@@ -1646,7 +1646,7 @@ H5B2_swap_leaf(H5F_t *f, hid_t dxpl_id, unsigned depth,
child_addr = internal->node_ptrs[idx].addr;
/* Lock B-tree child node */
- if (NULL == (child_leaf = H5AC_protect(f, dxpl_id, child_class, child_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ if (NULL == (child_leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, child_class, child_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* More setup for accessing child node information */
@@ -1711,11 +1711,11 @@ H5B2_insert_leaf(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
HDassert(H5F_addr_defined(curr_node_ptr->addr));
/* Lock current B-tree node */
- if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_WRITE)))
+ if (NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(bt2_shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Must have a leaf node with enough space to insert a record now */
@@ -1799,7 +1799,7 @@ H5B2_insert_internal(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(bt2_shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Split or redistribute child node pointers, if necessary */
@@ -1940,11 +1940,11 @@ H5B2_create_leaf(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, H5B2_node_ptr_t *n
H5RC_INC(leaf->shared);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(leaf->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(leaf->shared);
HDassert(shared);
/* Allocate space for the native keys in memory */
- if((leaf->leaf_native = H5FL_FAC_MALLOC(shared->node_info[0].nat_rec_fac)) == NULL)
+ if((leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(shared->node_info[0].nat_rec_fac)) == NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
#ifdef H5_USING_PURIFY
HDmemset(leaf->leaf_native, 0, shared->type->nrec_size * shared->node_info[0].max_nrec);
@@ -2013,18 +2013,18 @@ H5B2_create_internal(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
H5RC_INC(internal->shared);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(internal->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(internal->shared);
HDassert(shared);
/* Allocate space for the native keys in memory */
- if((internal->int_native = H5FL_FAC_MALLOC(shared->node_info[depth].nat_rec_fac)) == NULL)
+ if((internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(shared->node_info[depth].nat_rec_fac)) == NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys")
#ifdef H5_USING_PURIFY
HDmemset(internal->int_native, 0, shared->type->nrec_size * shared->node_info[depth].max_nrec);
#endif /* H5_USING_PURIFY */
/* Allocate space for the node pointers in memory */
- if((internal->node_ptrs = H5FL_FAC_MALLOC(shared->node_info[depth].node_ptr_fac)) == NULL)
+ if((internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(shared->node_info[depth].node_ptr_fac)) == NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers")
#ifdef H5_USING_PURIFY
HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (shared->node_info[depth].max_nrec + 1));
@@ -2086,7 +2086,7 @@ H5B2_protect_internal(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, haddr_t addr,
udata.depth = depth;
/* Protect the internal node */
- if(NULL == (ret_value = H5AC_protect(f, dxpl_id, H5AC_BT2_INT, addr, &udata, NULL, rw)))
+ if(NULL == (ret_value = (H5B2_internal_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_INT, addr, &udata, NULL, rw)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load B-tree internal node")
done:
@@ -2133,7 +2133,7 @@ H5B2_iterate_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth,
HDassert(op);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Protect current node & set up variables */
@@ -2150,7 +2150,7 @@ H5B2_iterate_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth,
node_native = internal->int_native;
/* Allocate space for the node pointers in memory */
- if((node_ptrs = H5FL_FAC_MALLOC(shared->node_info[depth].node_ptr_fac)) == NULL)
+ if((node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(shared->node_info[depth].node_ptr_fac)) == NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers")
/* Copy the node pointers */
@@ -2160,7 +2160,7 @@ H5B2_iterate_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth,
H5B2_leaf_t *leaf; /* Pointer to leaf node */
/* Lock the current B-tree node */
- if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node->addr, &(curr_node->node_nrec), bt2_shared, H5AC_READ)))
+ if (NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node->addr, &(curr_node->node_nrec), bt2_shared, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* Set up information about current node */
@@ -2170,7 +2170,7 @@ H5B2_iterate_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth,
} /* end else */
/* Allocate space for the native keys in memory */
- if((native = H5FL_FAC_MALLOC(shared->node_info[depth].nat_rec_fac)) == NULL)
+ if((native = (uint8_t *)H5FL_FAC_MALLOC(shared->node_info[depth].nat_rec_fac)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys")
/* Copy the native keys */
@@ -2248,11 +2248,11 @@ H5B2_remove_leaf(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
/* Lock current B-tree node */
leaf_addr = curr_node_ptr->addr;
- if(NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_WRITE)))
+ if(NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Sanity check number of records */
@@ -2351,7 +2351,7 @@ H5B2_remove_internal(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Determine the correct number of records to merge at */
@@ -2551,11 +2551,11 @@ H5B2_remove_leaf_by_idx(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
/* Lock B-tree leaf node */
leaf_addr = curr_node_ptr->addr;
- if(NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_WRITE)))
+ if(NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, leaf_addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Sanity check number of records */
@@ -2653,7 +2653,7 @@ H5B2_remove_internal_by_idx(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
HDassert(internal->nrec == curr_node_ptr->node_nrec);
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
HDassert(depth == shared->depth || internal->nrec > 1);
@@ -2919,11 +2919,11 @@ H5B2_neighbor_leaf(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
HDassert(op);
/* Lock current B-tree node */
- if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_READ)))
+ if (NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, &(curr_node_ptr->node_nrec), bt2_shared, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(bt2_shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
@@ -3017,7 +3017,7 @@ H5B2_neighbor_internal(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Locate node pointer for child */
@@ -3088,7 +3088,7 @@ H5B2_delete_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth,
HDassert(curr_node);
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(bt2_shared);
+ shared=(H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
if(depth>0) {
@@ -3113,7 +3113,7 @@ H5B2_delete_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth,
H5B2_leaf_t *leaf; /* Pointer to leaf node */
/* Lock the current B-tree node */
- if (NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node->addr, &(curr_node->node_nrec), bt2_shared, H5AC_WRITE)))
+ if (NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node->addr, &(curr_node->node_nrec), bt2_shared, H5AC_WRITE)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree leaf node")
/* Set up information about current node */
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index 5d77dfa..899bb8a 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -99,11 +99,11 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
HDassert(info);
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get pointer to reference counted shared B-tree info */
- shared = H5RC_GET_OBJ(bt2->shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2->shared);
/* Get information about the B-tree */
info->depth = shared->depth;
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 5f3e501..f2cf79d 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -269,7 +269,7 @@ H5B2_get_root_addr_test(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
HDassert(root_addr);
/* Look up the B-tree header */
- if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Get B-tree root addr */
@@ -319,7 +319,7 @@ H5B2_get_node_info_test(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr
HDassert(H5F_addr_defined(addr));
/* Look up the B-tree header */
- if (NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if (NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* Safely grab pointer to reference counted shared B-tree info, so we can release the B-tree header if necessary */
@@ -328,7 +328,7 @@ H5B2_get_node_info_test(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr
incr_rc=TRUE;
/* Get the pointer to the shared B-tree info */
- shared = H5RC_GET_OBJ(bt2_shared);
+ shared = (H5B2_shared_t *)H5RC_GET_OBJ(bt2_shared);
HDassert(shared);
/* Make copy of the root node pointer to start search with */
@@ -393,7 +393,7 @@ H5B2_get_node_info_test(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr
H5B2_leaf_t *leaf; /* Pointer to leaf node in B-tree */
/* Lock B-tree leaf node */
- if(NULL == (leaf = H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
+ if(NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr.addr, &(curr_node_ptr.node_nrec), bt2_shared, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node")
/* Locate record */
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 7841432..2748963 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -107,7 +107,7 @@ H5B_serialize(const H5F_t *f, const H5B_t *bt)
HDassert(f);
HDassert(bt);
HDassert(bt->rc_shared);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
p = shared->page;
@@ -190,7 +190,7 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, void *udata)
HDmemset(&bt->cache_info,0,sizeof(H5AC_info_t));
if((bt->rc_shared=(type->get_shared)(f, udata))==NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "can't retrieve B-tree node buffer")
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
if (NULL==(bt->native=H5FL_BLK_MALLOC(native_block,shared->sizeof_keys)) ||
NULL==(bt->child=H5FL_SEQ_MALLOC(haddr_t,(size_t)shared->two_k)))
@@ -279,7 +279,7 @@ H5B_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, uns
HDassert(f);
HDassert(H5F_addr_defined(addr));
HDassert(bt);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
HDassert(shared->type);
HDassert(shared->type->encode);
@@ -406,7 +406,7 @@ H5B_compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr)
HDassert(f);
HDassert(bt);
HDassert(bt->rc_shared);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
HDassert(shared->type);
HDassert(size_ptr);
diff --git a/src/H5D.c b/src/H5D.c
index a577a86..932d453 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -173,7 +173,7 @@ H5D_init_interface(void)
/* Get the default dataset creation property list values and initialize the
* default dataset with them.
*/
- if(NULL == (def_dcpl = H5I_object(H5P_LST_DATASET_CREATE_g)))
+ if(NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_g)))
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get default dataset creation property list")
/* Get the default data storage method */
@@ -304,7 +304,7 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
if(H5I_DATATYPE != H5I_get_type(type_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype ID")
- if(NULL == (space = H5I_object_verify(space_id, H5I_DATASPACE)))
+ if(NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace ID")
/* Get correct property list */
@@ -395,7 +395,7 @@ H5D_create_named(const H5G_loc_t *loc, const char *name, hid_t type_id,
HDassert(ocrt_info.new_obj);
/* Set the return value */
- ret_value = ocrt_info.new_obj;
+ ret_value = (H5D_t *)ocrt_info.new_obj;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -454,7 +454,7 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
if(H5I_DATATYPE != H5I_get_type(type_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype ID")
- if(NULL == (space = H5I_object_verify(space_id, H5I_DATASPACE)))
+ if(NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace ID")
if(H5P_DEFAULT == dcpl_id)
dcpl_id = H5P_DATASET_CREATE_DEFAULT;
@@ -596,7 +596,7 @@ H5Dclose(hid_t dset_id)
H5TRACE1("e", "i", dset_id);
/* Check args */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/*
@@ -638,7 +638,7 @@ H5Dget_space(hid_t dset_id)
H5TRACE1("i", "i", dset_id);
/* Check args */
- if(NULL==(dset=H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL==(dset=(H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Read the data space message and return a data space object */
@@ -685,7 +685,7 @@ H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
H5TRACE2("e", "i*Ds", dset_id, allocation);
/* Check arguments */
- if(NULL==(dset=H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL==(dset=(H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Read data space address and return */
@@ -789,7 +789,7 @@ H5Dget_type(hid_t dset_id)
H5TRACE1("i", "i", dset_id);
/* Check args */
- if(NULL==(dset=H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL==(dset=(H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Copy the datatype and mark it read-only */
@@ -850,15 +850,15 @@ H5Dget_create_plist(hid_t dset_id)
H5TRACE1("i", "i", dset_id);
/* Check args */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- if(NULL == (dcpl_plist = H5I_object(dset->shared->dcpl_id)))
+ if(NULL == (dcpl_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Copy the creation property list */
if((new_dcpl_id = H5P_copy_plist(dcpl_plist)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to copy the creation property list")
- if(NULL == (new_plist = H5I_object(new_dcpl_id)))
+ if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
@@ -914,7 +914,7 @@ H5Dextend(hid_t dset_id, const hsize_t *size)
H5TRACE2("e", "i*h", dset_id, size);
/* Check args */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if(!size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
@@ -968,7 +968,7 @@ H5D_new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
} /* end if */
else {
/* Get the property list */
- if(NULL == (plist = H5I_object(dcpl_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
new_dset->dcpl_id = H5P_copy_plist(plist);
@@ -1138,7 +1138,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
/* Get dataset's property list object */
HDassert(dset->shared->dcpl_id != H5P_DATASET_CREATE_DEFAULT);
- if(NULL == (dc_plist = H5I_object(dset->shared->dcpl_id)))
+ if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Update dataset creation property */
@@ -1263,7 +1263,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
H5P_genplist_t *dc_plist; /* Dataset's creation property list */
/* Get dataset's property list object */
- if(NULL == (dc_plist = H5I_object(dset->shared->dcpl_id)))
+ if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Check whether to add a "bogus" message */
@@ -1340,7 +1340,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
HDassert(H5I_GENPROP_LST==H5I_get_type(dxpl_id));
/* Get the dataset's datatype */
- if(NULL == (type = H5I_object(type_id)))
+ if(NULL == (type = (const H5T_t *)H5I_object(type_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype")
/* Check if the datatype is "sensible" for use in a dataset */
@@ -1398,7 +1398,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
H5O_fill_t *fill; /* Dataset's fill value info */
/* Get new dataset's property list object */
- if(NULL == (dc_plist = H5I_object(new_dset->shared->dcpl_id)))
+ if(NULL == (dc_plist = (H5P_genplist_t *)H5I_object(new_dset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get dataset creation property list")
/* Retrieve the properties we need */
@@ -1667,7 +1667,7 @@ H5D_open(const H5G_loc_t *loc, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy path")
/* Check if dataset was already open */
- if((shared_fo = H5FO_opened(dataset->oloc.file, dataset->oloc.addr)) == NULL) {
+ if((shared_fo = (H5D_shared_t *)H5FO_opened(dataset->oloc.file, dataset->oloc.addr)) == NULL) {
/* Clear any errors from H5FO_opened() */
H5E_clear_stack(NULL);
@@ -1762,7 +1762,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open")
/* Get the type and space */
- if(NULL == (dataset->shared->type = H5O_msg_read(&(dataset->oloc), H5O_DTYPE_ID, NULL, dxpl_id)))
+ if(NULL == (dataset->shared->type = (H5T_t *)H5O_msg_read(&(dataset->oloc), H5O_DTYPE_ID, NULL, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load type info from dataset header")
if(NULL == (dataset->shared->space = H5S_read(&(dataset->oloc), dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load space info from dataset header")
@@ -1772,7 +1772,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type")
/* Get dataset creation property list object */
- if(NULL == (plist = H5I_object(dataset->shared->dcpl_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dataset->shared->dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Get the optional filters message */
@@ -1996,7 +1996,7 @@ H5D_close(H5D_t *dataset)
dataset->shared->cache.contig.sieve_dirty = FALSE;
} /* end if */
- dataset->shared->cache.contig.sieve_buf = H5FL_BLK_FREE (sieve_buf,dataset->shared->cache.contig.sieve_buf);
+ dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf);
} /* end if */
/* Free cached information for each kind of dataset */
@@ -2516,7 +2516,7 @@ H5Dget_storage_size(hid_t dset_id)
H5TRACE1("h", "i", dset_id);
/* Check args */
- if(NULL==(dset=H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL==(dset=(H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataset")
/* Set return value */
@@ -2602,7 +2602,7 @@ H5Dget_offset(hid_t dset_id)
H5TRACE1("a", "i", dset_id);
/* Check args */
- if(NULL==(dset=H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL==(dset=(H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a dataset")
/* Set return value */
@@ -2746,7 +2746,7 @@ H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer")
if(H5I_DATATYPE != H5I_get_type(type_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype")
- if(NULL == (space = H5I_object_verify(space_id, H5I_DATASPACE)))
+ if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace")
if(!(H5S_has_extent(space)) )
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
@@ -2820,7 +2820,7 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf)
/* Check args */
if(H5I_DATATYPE != H5I_get_type(type_id) || buf == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(NULL == (space = H5I_object_verify(space_id, H5I_DATASPACE)))
+ if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace")
if(!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
@@ -2956,7 +2956,7 @@ H5D_vlen_get_buf_size(void UNUSED *elem, hid_t type_id, unsigned UNUSED ndim, co
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
/* Check args */
- if(NULL == (dt = H5I_object(type_id)))
+ if(NULL == (dt = (H5T_t *)H5I_object(type_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Make certain there is enough fixed-length buffer available */
@@ -3018,7 +3018,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
if(H5I_DATASET!=H5I_get_type(dataset_id) ||
H5I_DATATYPE!=H5I_get_type(type_id) || size==NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument")
- if(NULL == (space = H5I_object_verify(space_id, H5I_DATASPACE)))
+ if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace")
if(!(H5S_has_extent(space)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
@@ -3041,7 +3041,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available")
/* Get the pointer to the dataset transfer class */
- if(NULL == (pclass = H5I_object(H5P_CLS_DATASET_XFER_g)))
+ if(NULL == (pclass = (H5P_genclass_t *)H5I_object(H5P_CLS_DATASET_XFER_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class")
/* Change to the custom memory allocation routines for reading VL data */
@@ -3049,7 +3049,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "no dataset xfer plists available")
/* Get the property list struct */
- if(NULL == (plist = H5I_object(vlen_bufsize.xfer_pid)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(vlen_bufsize.xfer_pid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Set the memory manager to the special allocation routine */
@@ -3076,9 +3076,9 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace")
} /* end if */
if(vlen_bufsize.fl_tbuf != NULL)
- H5FL_BLK_FREE(vlen_fl_buf, vlen_bufsize.fl_tbuf);
+ (void)H5FL_BLK_FREE(vlen_fl_buf, vlen_bufsize.fl_tbuf);
if(vlen_bufsize.vl_tbuf != NULL)
- H5FL_BLK_FREE(vlen_vl_buf, vlen_bufsize.vl_tbuf);
+ (void)H5FL_BLK_FREE(vlen_vl_buf, vlen_bufsize.vl_tbuf);
if(vlen_bufsize.xfer_pid > 0) {
if(H5I_dec_ref(vlen_bufsize.xfer_pid) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref count on property list")
@@ -3111,7 +3111,7 @@ H5Dset_extent(hid_t dset_id, const hsize_t *size)
H5TRACE2("e", "i*h", dset_id, size);
/* Check args */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if(!size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
@@ -3271,14 +3271,14 @@ H5D_flush(const H5F_t *f, hid_t dxpl_id, unsigned flags)
unsigned u; /* Index variable */
H5_CHECK_OVERFLOW(num_dsets, unsigned, size_t);
- if(NULL == (id_list = H5MM_malloc((size_t)num_dsets * sizeof(hid_t))))
+ if(NULL == (id_list = (hid_t *)H5MM_malloc((size_t)num_dsets * sizeof(hid_t))))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to allocate memory for ID list")
if(H5F_get_obj_ids(f, H5F_OBJ_DATASET, -1, id_list) != num_dsets)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to get dataset ID list")
/* Iterate through the open datasets */
for(u = 0; u < num_dsets; u++) {
- if(NULL == (dataset = H5I_object_verify(id_list[u], H5I_DATASET)))
+ if(NULL == (dataset = (H5D_t *)H5I_object_verify(id_list[u], H5I_DATASET)))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to get dataset object")
/* Flush the raw data buffer, if we have a dirty one */
@@ -3355,7 +3355,7 @@ H5Ddebug(hid_t dset_id)
H5TRACE1("e", "i", dset_id);
/* Check args */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Print B-tree information */
diff --git a/src/H5L.c b/src/H5L.c
index 5e41b2e..f7b1f56 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -282,7 +282,7 @@ H5L_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_term_interface)
/* Free the table of link types */
- H5L_table_g = H5MM_xfree(H5L_table_g);
+ H5L_table_g = (H5L_class_t *)H5MM_xfree(H5L_table_g);
H5L_table_used_g = H5L_table_alloc_g = 0;
FUNC_LEAVE_NOAPI(n)
@@ -1355,8 +1355,7 @@ H5L_register(const H5L_class_t *cls)
if(i >= H5L_table_used_g) {
if(H5L_table_used_g >= H5L_table_alloc_g) {
size_t n = MAX(H5L_MIN_TABLE_SIZE, 2 * H5L_table_alloc_g);
- H5L_class_t *table = H5MM_realloc(H5L_table_g,
- n * sizeof(H5L_class_t));
+ H5L_class_t *table = (H5L_class_t *)H5MM_realloc(H5L_table_g, (n * sizeof(H5L_class_t)));
if(!table)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table")
H5L_table_g = table;
@@ -1689,7 +1688,7 @@ H5L_create_real(const H5G_loc_t *link_loc, const char *link_name,
unsigned crt_intmd_group;
/* Get link creation property list */
- if(NULL == (lc_plist = H5I_object(lcpl_id)))
+ if(NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Get intermediate group creation property */
@@ -2403,13 +2402,13 @@ H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
} /* end switch */
/* Set up user data for move_dest_cb */
- if((udata_out.lnk = H5O_msg_copy(H5O_LINK_ID, lnk, NULL)) == NULL)
+ if((udata_out.lnk = (H5O_link_t *)H5O_msg_copy(H5O_LINK_ID, lnk, NULL)) == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link to be moved")
/* In this special case, the link's name is going to be replaced at its
* destination, so we should free it here.
*/
- udata_out.lnk->name = H5MM_xfree(udata_out.lnk->name);
+ udata_out.lnk->name = (char *)H5MM_xfree(udata_out.lnk->name);
link_copied = TRUE;
udata_out.lnk->cset = udata->cset;
@@ -2458,7 +2457,7 @@ done:
*/
if(link_copied) {
if(udata_out.lnk->type == H5L_TYPE_SOFT)
- udata_out.lnk->u.soft.name = H5MM_xfree(udata_out.lnk->u.soft.name);
+ udata_out.lnk->u.soft.name = (char *)H5MM_xfree(udata_out.lnk->u.soft.name);
else if(udata_out.lnk->type >= H5L_TYPE_UD_MIN && udata_out.lnk->u.ud.size > 0)
udata_out.lnk->u.ud.udata = H5MM_xfree(udata_out.lnk->u.ud.udata);
H5MM_xfree(udata_out.lnk);
@@ -2517,7 +2516,7 @@ H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
if(lcpl_id != H5P_DEFAULT) {
unsigned crt_intmd_group;
- if(NULL == (lc_plist = H5I_object(lcpl_id)))
+ if(NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Get intermediate group creation property */
@@ -2538,7 +2537,7 @@ H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
if(lapl_id == H5P_DEFAULT)
lapl_copy = lapl_id;
else {
- if(NULL == (la_plist = H5I_object(lapl_id)))
+ if(NULL == (la_plist = (H5P_genplist_t *)H5I_object(lapl_id)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid access PL")
if((lapl_copy = H5P_copy_plist(la_plist)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy access properties")