summaryrefslogtreecommitdiffstats
path: root/src/H5FA.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-08-03 12:57:29 (GMT)
committerGitHub <noreply@github.com>2023-08-03 12:57:29 (GMT)
commit7fc8531b767855e69fb4016783a1131ba581fd5b (patch)
treea243310b99da59c858ae4eaeed8c452e0177bba4 /src/H5FA.c
parenta77d8bfcd7d066c6759b0346c02cbd612f90b7c2 (diff)
downloadhdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.zip
hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.tar.gz
hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.tar.bz2
Merge Made HGOTO_ERROR a do-while loop changes from develop (#3334)
Diffstat (limited to 'src/H5FA.c')
-rw-r--r--src/H5FA.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/H5FA.c b/src/H5FA.c
index 26895b1..cf4a1d9 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -111,25 +111,25 @@ H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata)
/* Allocate fixed array wrapper */
if (NULL == (fa = H5FL_CALLOC(H5FA_t)))
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array info")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array info");
/* Lock the array header into memory */
if (NULL == (hdr = H5FA__hdr_protect(f, fa_addr, ctx_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to load fixed array header")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to load fixed array header");
/* Check for pending array deletion */
if (from_open && hdr->pending_delete)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTOPENOBJ, NULL, "can't open fixed array pending deletion")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTOPENOBJ, NULL, "can't open fixed array pending deletion");
/* Point fixed array wrapper at header and bump it's ref count */
fa->hdr = hdr;
if (H5FA__hdr_incr(fa->hdr) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header");
/* Increment # of files using this array header */
if (H5FA__hdr_fuse_incr(fa->hdr) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL,
- "can't increment file reference count on shared array header")
+ "can't increment file reference count on shared array header");
/* Set file pointer for this array open context */
fa->f = f;
@@ -175,12 +175,12 @@ H5FA_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata)
/* Create fixed array header */
if (HADDR_UNDEF == (fa_addr = H5FA__hdr_create(f, cparam, ctx_udata)))
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "can't create fixed array header")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "can't create fixed array header");
/* Allocate and initialize new fixed array wrapper */
if (NULL == (fa = H5FA__new(f, fa_addr, FALSE, ctx_udata)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL,
- "allocation and/or initialization failed for fixed array wrapper")
+ "allocation and/or initialization failed for fixed array wrapper");
/* Set the return value */
ret_value = fa;
@@ -218,7 +218,7 @@ H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
/* Allocate and initialize new fixed array wrapper */
if (NULL == (fa = H5FA__new(f, fa_addr, TRUE, ctx_udata)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL,
- "allocation and/or initialization failed for fixed array wrapper")
+ "allocation and/or initialization failed for fixed array wrapper");
/* Set the return value */
ret_value = fa;
@@ -315,7 +315,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
/* Create the data block */
hdr->dblk_addr = H5FA__dblock_create(hdr, &hdr_dirty);
if (!H5_addr_defined(hdr->dblk_addr))
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create fixed array data block")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create fixed array data block");
}
assert(idx < hdr->cparam.nelmts);
@@ -324,7 +324,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL,
"unable to protect fixed array data block, address = %llu",
- (unsigned long long)hdr->dblk_addr)
+ (unsigned long long)hdr->dblk_addr);
/* Check for paging data block */
if (!dblock->npages) {
@@ -357,7 +357,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
/* Create the data block page */
if (H5FA__dblk_page_create(hdr, dblk_page_addr, dblk_page_nelmts) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page");
/* Mark data block page as initialized in data block */
H5VM_bit_set(dblock->dblk_page_init, page_idx, TRUE);
@@ -369,7 +369,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt)
(dblk_page = H5FA__dblk_page_protect(hdr, dblk_page_addr, dblk_page_nelmts, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL,
"unable to protect fixed array data block page, address = %llu",
- (unsigned long long)dblk_page_addr)
+ (unsigned long long)dblk_page_addr);
/* Set the element in the data block page */
H5MM_memcpy(((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), elmt,
@@ -422,7 +422,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
if (!H5_addr_defined(hdr->dblk_addr)) {
/* Call the class's 'fill' callback */
if ((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value");
} /* end if */
else {
/* Get the data block */
@@ -430,7 +430,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL,
"unable to protect fixed array data block, address = %llu",
- (unsigned long long)hdr->dblk_addr)
+ (unsigned long long)hdr->dblk_addr);
/* Check for paged data block */
if (!dblock->npages)
@@ -447,7 +447,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
/* Call the class's 'fill' callback */
if ((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value");
/* We've retrieved the value, leave now */
HGOTO_DONE(SUCCEED);
@@ -475,7 +475,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt)
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL,
"unable to protect fixed array data block page, address = %llu",
- (unsigned long long)dblk_page_addr)
+ (unsigned long long)dblk_page_addr);
/* Retrieve element from data block */
H5MM_memcpy(elmt, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx),
@@ -545,7 +545,7 @@ H5FA_close(H5FA_t *fa)
/* Check the header's status in the metadata cache */
if (H5AC_get_entry_status(fa->f, fa_addr, &hdr_status) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL,
- "unable to check metadata cache status for fixed array header")
+ "unable to check metadata cache status for fixed array header");
/* Sanity checks on header */
assert(hdr_status & H5AC_ES__IN_CACHE);
@@ -557,7 +557,7 @@ H5FA_close(H5FA_t *fa)
/* Lock the array header into memory */
/* (OK to pass in NULL for callback context, since we know the header must be in the cache) */
if (NULL == (hdr = H5FA__hdr_protect(fa->f, fa_addr, NULL, H5AC__NO_FLAGS_SET)))
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTLOAD, FAIL, "unable to load fixed array header")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTLOAD, FAIL, "unable to load fixed array header");
/* Set the shared array header's file context for this operation */
hdr->f = fa->f;
@@ -568,11 +568,11 @@ H5FA_close(H5FA_t *fa)
*/
if (H5FA__hdr_decr(fa->hdr) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL,
- "can't decrement reference count on shared array header")
+ "can't decrement reference count on shared array header");
/* Delete array, starting with header (unprotects header) */
if (H5FA__hdr_delete(hdr) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array");
} /* end if */
else {
/* Decrement the reference count on the array header */
@@ -581,7 +581,7 @@ H5FA_close(H5FA_t *fa)
*/
if (H5FA__hdr_decr(fa->hdr) < 0)
HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL,
- "can't decrement reference count on shared array header")
+ "can't decrement reference count on shared array header");
} /* end else */
} /* end if */
@@ -616,7 +616,7 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
/* Lock the array header into memory */
if (NULL == (hdr = H5FA__hdr_protect(f, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to protect fixed array header, address = %llu",
- (unsigned long long)fa_addr)
+ (unsigned long long)fa_addr);
/* Check for files using shared array header */
if (hdr->file_rc)
@@ -627,7 +627,7 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata)
/* Delete array now, starting with header (unprotects header) */
if (H5FA__hdr_delete(hdr) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array");
hdr = NULL;
}
@@ -668,13 +668,13 @@ H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata)
/* Allocate space for a native array element */
if (NULL == (elmt = H5FL_BLK_MALLOC(fa_native_elmt, fa->hdr->cparam.cls->nat_elmt_size)))
HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, H5_ITER_ERROR,
- "memory allocation failed for fixed array element")
+ "memory allocation failed for fixed array element");
/* Iterate over all elements in array */
for (u = 0; u < fa->hdr->stats.nelmts && ret_value == H5_ITER_CONT; u++) {
/* Get array element */
if (H5FA_get(fa, u, elmt) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, H5_ITER_ERROR, "unable to delete fixed array")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, H5_ITER_ERROR, "unable to delete fixed array");
/* Invoke callback */
if ((ret_value = (*op)(u, elmt, udata)) < 0) {
@@ -727,7 +727,7 @@ H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent)
/* Add the fixed array as a child of the parent (proxy) */
if (H5AC_proxy_entry_add_child(parent, hdr->f, hdr->top_proxy) < 0)
- HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "unable to add fixed array as child of proxy")
+ HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "unable to add fixed array as child of proxy");
hdr->parent = parent;
}