diff options
author | Sean McBride <sean@rogue-research.com> | 2023-08-02 13:39:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 13:39:15 (GMT) |
commit | 2b0badb90e4e516d0758efbd8ec96449188c7249 (patch) | |
tree | 074e38039b95ca7121a0117069974eff52a04519 /src/H5Oint.c | |
parent | 56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff) | |
download | hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.zip hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.gz hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.bz2 |
Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
Diffstat (limited to 'src/H5Oint.c')
-rw-r--r-- | src/H5Oint.c | 248 |
1 files changed, 124 insertions, 124 deletions
diff --git a/src/H5Oint.c b/src/H5Oint.c index 9db177a..e4cb65b 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -234,7 +234,7 @@ H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_id /* Version bounds check */ if (version > H5O_obj_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "object header version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "object header version out of bounds"); /* Set the message version */ oh->version = version; @@ -276,12 +276,12 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc */ oh = H5O_create_ohdr(f, ocpl_id); if (NULL == oh) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header"); /* apply object header information to file */ if (H5O_apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file"); done: if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0)) @@ -315,30 +315,30 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id) /* Check for invalid access request */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file"); oh = H5FL_CALLOC(H5O_t); if (NULL == oh) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id); if (NULL == oc_plist) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a property list"); /* Get any object header status flags set by properties */ if (H5P_DATASET_CREATE_DEFAULT == ocpl_id) { /* If the OCPL is the default DCPL, we can get the header flags from the * API context. Otherwise we have to call H5P_get */ if (H5CX_get_ohdr_flags(&oh_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags"); } else { if (H5P_get(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags"); } if (H5O__set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header"); oh->flags = oh_flags; @@ -390,14 +390,14 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init if (0 < H5P_exist_plist(oc_plist, H5O_BAD_MESG_COUNT_NAME)) /* Get bad message count flag -- from property list */ if (H5P_get(oc_plist, H5O_BAD_MESG_COUNT_NAME, &oh->store_bad_mesg_count) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get bad message count flag") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get bad message count flag"); #endif /* H5O_ENABLE_BAD_MESG_COUNT */ /* Create object header proxy if doing SWMR writes */ if (oh->swmr_write) { oh->proxy = H5AC_proxy_entry_create(); if (NULL == oh->proxy) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy"); } else { oh->proxy = NULL; @@ -405,7 +405,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id); if (NULL == oc_plist) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list"); /* Initialize version-specific fields */ if (oh->version > H5O_VERSION_1) { @@ -421,9 +421,9 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init /* Get attribute storage phase change values -- from property list */ if (H5P_get(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes"); if (H5P_get(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes"); /* Check for non-default attribute storage phase change values */ if (H5O_CRT_ATTR_MAX_COMPACT_DEF != oh->max_compact || H5O_CRT_ATTR_MIN_DENSE_DEF != oh->min_dense) @@ -457,14 +457,14 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init /* Allocate disk space for header and first chunk */ oh_addr = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)oh_size); if (HADDR_UNDEF == oh_addr) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header"); /* Create the chunk list */ oh->nchunks = 1; oh->alloc_nchunks = 1; oh->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, (size_t)oh->alloc_nchunks); if (NULL == oh->chunk) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the first chunk */ oh->chunk[0].addr = oh_addr; @@ -475,7 +475,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init /* (including space for serializing the object header prefix */ oh->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, oh_size); if (NULL == oh->chunk[0].image) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); oh->chunk[0].chunk_proxy = NULL; /* Put magic # for object header in first chunk */ @@ -487,7 +487,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init oh->alloc_nmesgs = H5O_NMESGS; oh->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh->alloc_nmesgs); if (NULL == oh->mesg) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the initial "null" message; covers the entire first chunk */ oh->mesg[0].type = H5O_MSG_NULL; @@ -523,7 +523,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init loc_out->addr = oh_addr; if (H5O_open(loc_out) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -595,12 +595,12 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type) /* Find the object's location */ if (H5G_loc_find(loc, name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "object not found"); loc_found = TRUE; /* Open the object */ if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: if (NULL == ret_value) @@ -642,12 +642,12 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5 /* Find the object's location, according to the order in the index */ if (H5G_loc_find_by_idx(loc, name, idx_type, order, n, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "group not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "group not found"); loc_found = TRUE; /* Open the object */ if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: /* Release the object location if we failed after copying it */ @@ -691,7 +691,7 @@ H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type) /* Open the object */ if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -719,12 +719,12 @@ H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type) /* Get the object class for this location */ if (NULL == (obj_class = H5O__obj_class(obj_loc->oloc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object class"); /* Call the object class's 'open' routine */ assert(obj_class->open); if (NULL == (ret_value = obj_class->open(obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -780,11 +780,11 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/) if (H5F_NOPEN_OBJS(loc->file) == H5F_NMOUNTS(loc->file)) /* Attempt to close down the file hierarchy */ if (H5F_try_close(loc->file, file_closed) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close"); /* Release location information */ if (H5O_loc_free(loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "problem attempting to free location") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "problem attempting to free location"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -820,14 +820,14 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (adjust < 0) { /* Check for too large of an adjustment */ if ((unsigned)(-adjust) > oh->nlink) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, (-1), "link count would be negative") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, (-1), "link count would be negative"); /* Adjust the link count for the object header */ oh->nlink = (unsigned)((int)oh->nlink + adjust); /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty"); /* Check if the object should be deleted */ if (oh->nlink == 0) { @@ -835,7 +835,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5FO_opened(f, addr) != NULL) { /* Flag the object to be deleted when it's closed */ if (H5FO_mark(f, addr, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion"); } /* end if */ else { /* Mark the object header for deletion */ @@ -850,7 +850,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5FO_marked(f, addr)) { /* Remove "delete me" flag on the object */ if (H5FO_mark(f, addr, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion"); } /* end if */ } /* end if */ @@ -859,7 +859,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty"); } /* end if */ /* Check for operations on refcount message */ @@ -869,7 +869,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) /* Check for removing refcount message */ if (oh->nlink <= 1) { if (H5O__msg_remove_real(f, oh, H5O_MSG_REFCOUNT, H5O_ALL, NULL, NULL, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "unable to delete refcount message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "unable to delete refcount message"); oh->has_refcount_msg = FALSE; } /* end if */ /* Update refcount message with new link count */ @@ -878,7 +878,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5O__msg_write_real(f, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, (-1), "unable to update refcount message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, (-1), "unable to update refcount message"); } /* end else */ } /* end if */ else { @@ -888,7 +888,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5O__msg_append_real(f, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, (-1), "unable to create new refcount message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, (-1), "unable to create new refcount message"); oh->has_refcount_msg = TRUE; } /* end if */ } /* end else */ @@ -930,11 +930,11 @@ H5O_link(const H5O_loc_t *loc, int adjust) /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Call the "real" link routine */ if ((ret_value = H5O__link_oh(loc->file, adjust, oh, &deleted)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust object link count"); done: if (oh && H5O_unpin(oh) < 0) @@ -978,12 +978,12 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Check for valid address */ if (!H5_addr_defined(loc->addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined"); /* Check for write access on the file */ file_intent = H5F_INTENT(loc->file); if ((0 == (prot_flags & H5AC__READ_ONLY_FLAG)) && (0 == (file_intent & H5F_ACC_RDWR))) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file"); /* Construct the user data for protect callback */ udata.made_attempt = FALSE; @@ -1000,7 +1000,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Lock the object header into the cache */ if (NULL == (oh = (H5O_t *)H5AC_protect(loc->file, H5AC_OHDR, loc->addr, &udata, prot_flags))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header"); /* Check if there are any continuation messages to process */ if (cont_msg_info.nmsgs > 0) { @@ -1040,7 +1040,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(loc->file, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, &chk_udata, prot_flags))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk"); /* Sanity check */ assert(chk_proxy->oh == oh); @@ -1050,7 +1050,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Release the chunk from the cache */ if (H5AC_unprotect(loc->file, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header chunk"); /* Advance to next continuation message */ curr_msg++; @@ -1077,7 +1077,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Check for incorrect # of messages in v1 object header */ if (oh->version == H5O_VERSION_1 && (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages"); #endif /* H5_STRICT_FORMAT_CHECKS */ } /* end if */ @@ -1100,15 +1100,15 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(loc->file, oh, u))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header chunk"); /* Pin chunk proxy*/ if (H5AC_pin_protected_entry(chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header chunk"); /* Unprotect chunk */ if (H5O__chunk_unprotect(loc->file, chk_proxy, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect object header chunk"); /* Preserve chunk proxy pointer for later */ oh->chunk[u].chunk_proxy = chk_proxy; @@ -1160,12 +1160,12 @@ H5O_pin(const H5O_loc_t *loc) /* Get header */ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header"); /* Increment the reference count on the object header */ /* (which will pin it, if appropriate) */ if (H5O__inc_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "unable to increment reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "unable to increment reference count on object header"); /* Set the return value */ ret_value = oh; @@ -1202,7 +1202,7 @@ H5O_unpin(H5O_t *oh) /* Decrement the reference count on the object header */ /* (which will unpin it, if appropriate) */ if (H5O__dec_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1243,7 +1243,7 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags) if (NULL != oh->chunk[u].chunk_proxy) { /* Release chunk proxy */ if (H5AC_unpin_entry(oh->chunk[u].chunk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header chunk"); oh->chunk[u].chunk_proxy = NULL; } /* end if */ } /* end for */ @@ -1254,7 +1254,7 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags) /* Unprotect the object header */ if (H5AC_unprotect(loc->file, H5AC_OHDR, oh->chunk[0].addr, oh, oh_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1309,7 +1309,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Allocate space for the modification time message */ if (H5O__msg_alloc(f, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now, &idx) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, - "unable to allocate space for modification time message") + "unable to allocate space for modification time message"); /* Set the message's flags if appropriate */ oh->mesg[idx].flags = (uint8_t)mesg_flags; @@ -1317,13 +1317,13 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, oh->mesg[idx].chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Allocate 'native' space, if necessary */ if (NULL == oh->mesg[idx].native) { if (NULL == (oh->mesg[idx].native = H5FL_MALLOC(time_t))) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, - "memory allocation failed for modification time message") + "memory allocation failed for modification time message"); } /* end if */ /* Update the message */ @@ -1341,7 +1341,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty"); } /* end else */ } /* end if */ @@ -1379,11 +1379,11 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Create/Update the modification time message */ if (H5O_touch_oh(loc->file, oh, force) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update object modification time") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update object modification time"); /* Mark object header as changed */ oh_flags |= H5AC__DIRTIED_FLAG; @@ -1429,7 +1429,7 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags) /* Allocate the native message in memory */ if (NULL == (bogus = H5MM_malloc(sizeof(H5O_bogus_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message"); /* Update the native value */ bogus->u = H5O_BOGUS_VALUE; @@ -1439,11 +1439,11 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags) else if (bogus_id == H5O_BOGUS_INVALID_ID) type = H5O_MSG_BOGUS_INVALID; else - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "invalid ID for 'bogus' message") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "invalid ID for 'bogus' message"); /* Allocate space in the object header for bogus message */ if (H5O__msg_alloc(f, oh, type, &mesg_flags, bogus, &idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message"); /* Point to "bogus" information (take it over) */ oh->mesg[idx].native = bogus; @@ -1495,18 +1495,18 @@ H5O_delete(H5F_t *f, haddr_t addr) /* Get the object header information */ if (NULL == (oh = H5O_protect(&loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Delete object */ if (H5O__delete_oh(f, oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file"); /* Uncork cache entries with tag: addr */ if (H5AC_cork(f, addr, H5AC__GET_CORKED, &corked) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status"); if (corked) if (H5AC_cork(f, addr, H5AC__UNCORK, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNCORK, FAIL, "unable to uncork an object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNCORK, FAIL, "unable to uncork an object"); /* Mark object header as deleted */ oh_flags = H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; @@ -1551,7 +1551,7 @@ H5O__delete_oh(H5F_t *f, H5O_t *oh) /* Free any space referred to in the file from this message */ if (H5O__delete_mesg(f, oh, curr_msg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, - "unable to delete file space for object header message") + "unable to delete file space for object header message"); } /* end for */ done: @@ -1578,11 +1578,11 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type) /* Load the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Retrieve the type of the object */ if (H5O__obj_type_real(oh, obj_type) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -1647,11 +1647,11 @@ H5O__obj_class(const H5O_loc_t *loc) /* Load the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header"); /* Test whether entry qualifies as a particular type of object */ if (NULL == (ret_value = H5O__obj_class_real(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object type"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -1687,13 +1687,13 @@ H5O__obj_class_real(const H5O_t *oh) htri_t isa; /* Is entry a particular type? */ if ((isa = (H5O_obj_class_g[i - 1]->isa)(oh)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type"); else if (isa) HGOTO_DONE(H5O_obj_class_g[i - 1]); } if (0 == i) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1719,21 +1719,21 @@ H5O_get_loc(hid_t object_id) switch (H5I_get_type(object_id)) { case H5I_GROUP: if (NULL == (ret_value = H5O_OBJ_GROUP->get_oloc(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from group ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from group ID"); break; case H5I_DATASET: if (NULL == (ret_value = H5O_OBJ_DATASET->get_oloc(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from dataset ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from dataset ID"); break; case H5I_DATATYPE: if (NULL == (ret_value = H5O_OBJ_DATATYPE->get_oloc(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from datatype ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from datatype ID"); break; case H5I_MAP: - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -1751,7 +1751,7 @@ H5O_get_loc(hid_t object_id) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "invalid object type") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "invalid object type"); } /* end switch */ done: @@ -1933,7 +1933,7 @@ H5O_loc_free(H5O_loc_t *loc) loc->holding_file = FALSE; if (H5F_NOPEN_OBJS(loc->file) <= 0) { if (H5F_try_close(loc->file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file"); } } @@ -1968,11 +1968,11 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header"); /* Get the information for the object header */ if (H5O__get_hdr_info_real(oh, hdr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -2083,15 +2083,15 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Get class for object */ if (NULL == (obj_class = H5O__obj_class_real(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class"); /* Reset the object info structure */ if (H5O__reset_info2(oinfo) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct"); /* Get basic information, if requested */ if (fields & H5O_INFO_BASIC) { @@ -2100,7 +2100,7 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Set the object's address into the token */ if (H5VL_native_addr_to_token(loc->file, H5I_FILE, loc->addr, &oinfo->token) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token"); /* Retrieve the type of the object */ oinfo->type = obj_class->type; @@ -2131,20 +2131,20 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Might be information for modification time */ if ((exists = H5O_msg_exists_oh(oh, H5O_MTIME_ID)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message"); if (exists > 0) { /* Get "old style" modification time info */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_ID, &oinfo->ctime)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message"); } /* end if */ else { /* Check for "new style" modification time info */ if ((exists = H5O_msg_exists_oh(oh, H5O_MTIME_NEW_ID)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message"); if (exists > 0) { /* Get "new style" modification time info */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_NEW_ID, &oinfo->ctime)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message"); } /* end if */ else oinfo->ctime = 0; @@ -2155,7 +2155,7 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Retrieve # of attributes */ if (fields & H5O_INFO_NUM_ATTRS) if (H5O__attr_count_real(loc->file, oh, &oinfo->num_attrs) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -2189,11 +2189,11 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Get class for object */ if (NULL == (obj_class = H5O__obj_class_real(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class"); /* Reset the object info structure */ memset(oinfo, 0, sizeof(*oinfo)); @@ -2201,7 +2201,7 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie /* Get the information for the object header, if requested */ if (fields & H5O_NATIVE_INFO_HDR) if (H5O__get_hdr_info_real(oh, &oinfo->hdr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info"); /* Get B-tree & heap metadata storage size, if requested */ if (fields & H5O_NATIVE_INFO_META_SIZE) { @@ -2209,11 +2209,11 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie if (obj_class->bh_info) /* Call the object's class 'bh_info' routine */ if ((obj_class->bh_info)(loc, oh, &oinfo->meta_size.obj) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object's btree & heap info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object's btree & heap info"); /* Get B-tree & heap info for any attributes */ if (H5O__attr_bh_info(loc->file, oh, &oinfo->meta_size.attr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute btree & heap info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute btree & heap info"); } /* end if */ done: @@ -2247,7 +2247,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Set property values, if they were used for the object */ if (oh->version > H5O_VERSION_1) { @@ -2256,9 +2256,9 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist) /* Set attribute storage values */ if (H5P_set(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, - "can't set max. # of compact attributes in property list") + "can't set max. # of compact attributes in property list"); if (H5P_set(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list"); /* Mask off non-"user visible" flags */ H5_CHECKED_ASSIGN(ohdr_flags, uint8_t, @@ -2268,7 +2268,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist) /* Set object header flags */ if (H5P_set(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags"); } /* end if */ done: @@ -2302,7 +2302,7 @@ H5O_get_nlinks(const H5O_loc_t *loc, hsize_t *nlinks) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Retrieve the # of link messages seen when the object header was loaded */ *nlinks = oh->link_msgs_seen; @@ -2345,7 +2345,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc /* Call the object class's 'create' routine */ assert(H5O_obj_class_g[u]->create); if (NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); /* Break out of loop */ break; @@ -2451,7 +2451,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Set the object's reference count */ if (rc) @@ -2460,7 +2460,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype) /* Retrieve the type of the object */ if (otype) if (H5O__obj_type_real(oh, otype) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -2527,7 +2527,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Find the object using the LAPL passed in */ /* (Correctly handles mounted files) */ if (H5G_loc_find(udata->start_loc, name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found"); obj_found = TRUE; /* Construct unique "position" for this object */ @@ -2540,7 +2540,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Get the object's info */ if (H5O_get_info(&obj_oloc, &oinfo, udata->fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info"); /* Make the application callback */ ret_value = (udata->op)(udata->obj_id, name, &oinfo, udata->op_data); @@ -2554,7 +2554,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Allocate new object "position" node */ if ((new_node = H5FL_MALLOC(H5_obj_t)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node"); /* Set node information */ *new_node = obj_pos; @@ -2562,7 +2562,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Add to list of visited objects */ if (H5SL_insert(udata->visited, new_node, new_node) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, - "can't insert object node into visited list") + "can't insert object node into visited list"); } /* end if */ } /* end if */ } /* end if */ @@ -2637,25 +2637,25 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); loc_found = TRUE; /* Get the object's info */ if (H5O_get_info(&obj_oloc, &oinfo, fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info"); /* Open the object */ /* (Takes ownership of the obj_loc information) */ if (NULL == (obj = H5O_open_by_loc(&obj_loc, &opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object"); /* Get an ID for the visited object */ if ((obj_id = H5VL_wrap_register(opened_type, obj, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register visited object") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register visited object"); /* Make callback for starting object */ if ((ret_value = op(obj_id, ".", &oinfo, op_data)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects"); /* Check return value of first callback */ if (ret_value != H5_ITER_CONT) @@ -2668,7 +2668,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Get the location of the starting group */ if (H5G_loc(obj_id, &start_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Set up user data for visiting links */ udata.obj_id = obj_id; @@ -2679,7 +2679,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Create skip list to store visited object information */ if ((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects"); /* If its ref count is > 1, we add it to the list of visited objects */ /* (because it could come up again during traversal) */ @@ -2688,7 +2688,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Allocate new object "position" node */ if ((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "can't allocate object node") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "can't allocate object node"); /* Construct unique "position" for this object */ obj_pos->fileno = oinfo.fileno; @@ -2696,20 +2696,20 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* De-serialize object token into an object address */ if (H5VL_native_token_to_addr(loc->oloc->file, H5I_FILE, oinfo.token, &(obj_pos->addr)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Add to list of visited objects */ if (H5SL_insert(udata.visited, obj_pos, obj_pos) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object node into visited list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object node into visited list"); } /* Get the location of the visited group */ if (H5G_loc(obj_id, &vis_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Call internal group visitation routine */ if ((ret_value = H5G_visit(&vis_loc, ".", idx_type, order, H5O__visit_cb, &udata)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); } /* end if */ done: @@ -2749,7 +2749,7 @@ H5O__inc_rc(H5O_t *oh) /* Pin the object header when the reference count goes above 0 */ if (oh->rc == 0) if (H5AC_pin_protected_entry(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Increment reference count */ oh->rc++; @@ -2776,7 +2776,7 @@ H5O__dec_rc(H5O_t *oh) /* check args */ if (!oh) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object header") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object header"); /* Decrement reference count */ oh->rc--; @@ -2784,7 +2784,7 @@ H5O__dec_rc(H5O_t *oh) /* Unpin the object header when the reference count goes back to 0 */ if (oh->rc == 0) if (H5AC_unpin_entry(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2813,12 +2813,12 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc) /* Get header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Decrement the reference count on the object header */ /* (which will unpin it, if appropriate) */ if (H5O__dec_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header"); done: /* Release the object header from the cache */ @@ -2903,7 +2903,7 @@ H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force) /* Destroy the proxy */ if (oh->proxy) if (H5AC_proxy_entry_dest(oh->proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy virtual entry used for proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy virtual entry used for proxy"); /* destroy object header */ oh = H5FL_FREE(H5O_t, oh); |