summaryrefslogtreecommitdiffstats
path: root/src/H5Bdbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-10-26 18:07:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-10-26 18:07:18 (GMT)
commit1fd8a32c91aa52e4c978187326d45498d7209a68 (patch)
treecda94d9db3aaf6a5121d21e646dcf5525c9c500a /src/H5Bdbg.c
parent2efc06789a49816350f7c56e14aad39986016bf5 (diff)
downloadhdf5-1fd8a32c91aa52e4c978187326d45498d7209a68.zip
hdf5-1fd8a32c91aa52e4c978187326d45498d7209a68.tar.gz
hdf5-1fd8a32c91aa52e4c978187326d45498d7209a68.tar.bz2
[svn-r19668] Description:
Do some extra range-checking on H5Pset_elink_acc_flags() calls. Clean up some minor compiler warnings also. Tested on: Mac OS X/32 10.6.4 (amazon) w/debug & production (too minor to require h5committest)
Diffstat (limited to 'src/H5Bdbg.c')
-rw-r--r--src/H5Bdbg.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index 55d9617..23ea9c8 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -177,7 +177,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
H5RC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
- int i, ncell, cmp;
+ int ncell, cmp;
static int ncalls = 0;
herr_t status;
herr_t ret_value = SUCCEED; /* Return value */
@@ -210,7 +210,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
HDassert(bt);
shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
- cur = H5MM_calloc(sizeof(struct child_t));
+ cur = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
HDassert(cur);
cur->addr = addr;
cur->level = bt->level;
@@ -242,24 +242,26 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
HDassert(!H5F_addr_defined(bt->left));
if(cur->level > 0) {
- for(i = 0; i < bt->nchildren; i++) {
+ unsigned u;
+
+ for(u = 0; u < bt->nchildren; u++) {
/*
* Check that child nodes haven't already been seen. If they
* have then the tree has a cycle.
*/
for(tmp = head; tmp; tmp = tmp->next)
- HDassert(H5F_addr_ne(tmp->addr, bt->child[i]));
+ HDassert(H5F_addr_ne(tmp->addr, bt->child[u]));
/* Add the child node to the end of the queue */
- tmp = H5MM_calloc(sizeof(struct child_t));
+ tmp = (struct child_t *)H5MM_calloc(sizeof(struct child_t));
HDassert(tmp);
- tmp->addr = bt->child[i];
+ tmp->addr = bt->child[u];
tmp->level = bt->level - 1;
tail->next = tmp;
tail = tmp;
/* Check that the keys are monotonically increasing */
- cmp = (type->cmp2)(H5B_NKEY(bt, shared, i), udata, H5B_NKEY(bt, shared, i + 1));
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, u), udata, H5B_NKEY(bt, shared, u + 1));
HDassert(cmp < 0);
} /* end for */
} /* end if */