diff options
Diffstat (limited to 'src/H5Bcache.c')
-rw-r--r-- | src/H5Bcache.c | 13 |
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 */ |