summaryrefslogtreecommitdiffstats
path: root/src/H5Bcache.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-06-17 11:48:34 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-06-17 11:48:34 (GMT)
commitfb27787c2abb889a2184bb39eead626a144117d0 (patch)
tree7ad16361ac8b2382f0ccf72ce47aae020fed688c /src/H5Bcache.c
parent984ecb72c2fa62d233383b24047e04061754ae34 (diff)
parent6e9e9e0dd200979642de8d2a2bce2f66f9728237 (diff)
downloadhdf5-fb27787c2abb889a2184bb39eead626a144117d0.zip
hdf5-fb27787c2abb889a2184bb39eead626a144117d0.tar.gz
hdf5-fb27787c2abb889a2184bb39eead626a144117d0.tar.bz2
[svn-r27222] Merge of r27035-27221 from the trunk.
Tested on 64-bit linux VM: Serial: C++ and Fortran 2003 Parallel: Fortran
Diffstat (limited to 'src/H5Bcache.c')
-rw-r--r--src/H5Bcache.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 2992986..a161e88 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -56,7 +56,7 @@
/* Metadata cache callbacks */
static H5B_t *H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
-static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned UNUSED * flags_ptr);
+static herr_t H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *b, unsigned H5_ATTR_UNUSED * flags_ptr);
static herr_t H5B__dest(H5F_t *f, H5B_t *bt);
static herr_t H5B__clear(H5F_t *f, H5B_t *b, hbool_t destroy);
static herr_t H5B__compute_size(const H5F_t *f, const H5B_t *bt, size_t *size_ptr);
@@ -115,6 +115,7 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(H5F_addr_defined(addr));
HDassert(udata);
+ /* Allocate the B-tree node in memory */
if(NULL == (bt = H5FL_MALLOC(H5B_t)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct")
HDmemset(&bt->cache_info, 0, sizeof(H5AC_info_t));
@@ -141,7 +142,7 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* magic number */
if(HDmemcmp(p, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree signature")
+ HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature")
p += 4;
/* node type and level */
@@ -185,7 +186,7 @@ H5B__load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
done:
if(!ret_value && bt)
- if(H5B_node_dest(bt) < 0)
+ if(H5B__node_dest(bt) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, NULL, "unable to destroy B-tree node")
FUNC_LEAVE_NOAPI(ret_value)
@@ -206,7 +207,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned UNUSED * flags_ptr)
+H5B__flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B_t *bt, unsigned H5_ATTR_UNUSED * flags_ptr)
{
H5B_shared_t *shared; /* Pointer to shared B-tree info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -328,7 +329,7 @@ H5B__dest(H5F_t *f, H5B_t *bt)
} /* end if */
/* Destroy B-tree node */
- if(H5B_node_dest(bt) < 0)
+ if(H5B__node_dest(bt) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node")
done:
@@ -388,7 +389,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5B__compute_size(const H5F_t UNUSED *f, const H5B_t *bt, size_t *size_ptr)
+H5B__compute_size(const H5F_t H5_ATTR_UNUSED *f, const H5B_t *bt, size_t *size_ptr)
{
H5B_shared_t *shared; /* Pointer to shared B-tree info */