From 34323c289dabeb875beb9765fafa3651d0378f4f Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 27 Jul 2020 11:09:56 -0700 Subject: Minor normalization with develop --- src/H5Abtree2.c | 1 + src/H5Adense.c | 249 ++++++++++++++++++++--------------------------- src/H5Aint.c | 279 +++++++++++++++++++++++------------------------------ src/H5B2.c | 19 +--- src/H5B2dbg.c | 6 +- src/H5B2hdr.c | 14 +-- src/H5B2int.c | 10 +- src/H5B2internal.c | 4 +- src/H5B2leaf.c | 5 +- src/H5EAdbg.c | 24 +++-- src/H5F.c | 21 ++-- src/H5Gent.c | 1 + src/H5Gloc.c | 10 +- src/H5Oalloc.c | 5 +- src/H5Obogus.c | 2 +- src/H5Ochunk.c | 69 ++++++------- src/H5Ocont.c | 44 ++++----- src/H5Opkg.h | 11 +-- 18 files changed, 321 insertions(+), 453 deletions(-) diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index 825043b..3377aa2 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -35,6 +35,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Apkg.h" /* Attributes */ #include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ #include "H5SMprivate.h" /* Shared object header messages */ diff --git a/src/H5Adense.c b/src/H5Adense.c index 1caaa41..031efcf 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -164,14 +164,13 @@ typedef struct H5A_bt2_ud_rmbi_t { /*------------------------------------------------------------------------- - * Function: H5A__dense_create + * Function: H5A__dense_create * - * Purpose: Creates dense attribute storage structures for an object + * Purpose: Creates dense attribute storage structures for an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Dec 4 2006 * *------------------------------------------------------------------------- @@ -188,9 +187,7 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); @@ -286,15 +283,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_fnd_cb + * Function: H5A__dense_fnd_cb * - * Purpose: Callback when an attribute is located in an index + * Purpose: Callback when an attribute is located in an index * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -306,12 +302,11 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Check arguments */ HDassert(attr); HDassert(user_attr); HDassert(took_ownership); + /* * If there is an attribute already stored in "user_attr", * we need to free the dynamially allocated spaces for the @@ -351,15 +346,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_open + * Function: H5A__dense_open * - * Purpose: Open an attribute in dense storage structures for an object + * Purpose: Open an attribute in dense storage structures for an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -376,9 +370,7 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(name); @@ -442,15 +434,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_insert + * Function: H5A__dense_insert * - * Purpose: Insert an attribute into dense storage structures for an object + * Purpose: Insert an attribute into dense storage structures for an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 4 2006 + * Programmer: Quincey Koziol + * Dec 4 2006 * *------------------------------------------------------------------------- */ @@ -470,9 +461,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(attr); @@ -601,15 +590,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_write_bt2_cb2 + * Function: H5A__dense_write_bt2_cb2 * - * Purpose: v2 B-tree 'modify' callback to update the record for a creation - * order index + * Purpose: v2 B-tree 'modify' callback to update the record for a creation + * order index * - * Return: Success: 0 - * Failure: 1 + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, February 20, 2007 * *------------------------------------------------------------------------- @@ -622,9 +610,7 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) FUNC_ENTER_STATIC_NOERR - /* - * Check arguments. - */ + /* Check arguments */ HDassert(record); HDassert(new_heap_id); @@ -639,14 +625,13 @@ H5A__dense_write_bt2_cb2(void *_record, void *_op_data, hbool_t *changed) /*------------------------------------------------------------------------- - * Function: H5A__dense_write_bt2_cb + * Function: H5A__dense_write_bt2_cb * - * Purpose: v2 B-tree 'modify' callback to update the data for an attribute + * Purpose: v2 B-tree 'modify' callback to update the data for an attribute * - * Return: Success: 0 - * Failure: 1 + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, December 5, 2006 * *------------------------------------------------------------------------- @@ -663,9 +648,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) FUNC_ENTER_STATIC - /* - * Check arguments. - */ + /* Check arguments */ HDassert(record); HDassert(op_data); @@ -753,15 +736,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_write + * Function: H5A__dense_write * - * Purpose: Modify an attribute in dense storage structures for an object + * Purpose: Modify an attribute in dense storage structures for an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 4 2006 + * Programmer: Quincey Koziol + * Dec 4 2006 * *------------------------------------------------------------------------- */ @@ -778,9 +760,7 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(H5F_addr_defined(ainfo->fheap_addr)); @@ -851,16 +831,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_copy_fh_cb + * Function: H5A__dense_copy_fh_cb * - * Purpose: Callback for fractal heap operator, to make copy of attribute + * Purpose: Callback for fractal heap operator, to make copy of attribute * for calling routine * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 5 2006 + * Programmer: Quincey Koziol + * Dec 5 2006 * *------------------------------------------------------------------------- */ @@ -895,15 +874,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_rename + * Function: H5A__dense_rename * - * Purpose: Rename an attribute in dense storage structures for an object + * Purpose: Rename an attribute in dense storage structures for an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jan 3 2007 + * Programmer: Quincey Koziol + * Jan 3 2007 * *------------------------------------------------------------------------- */ @@ -924,9 +902,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(old_name); @@ -1055,7 +1031,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count") } /* end if */ else if(shared_mesg < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared") /* Delete old attribute from dense storage */ if(H5A__dense_remove(f, ainfo, old_name) < 0) @@ -1079,15 +1055,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_iterate_bt2_cb + * Function: H5A__dense_iterate_bt2_cb * - * Purpose: v2 B-tree callback for dense attribute storage iterator + * Purpose: v2 B-tree callback for dense attribute storage iterator * - * Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP + * Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 5 2006 + * Programmer: Quincey Koziol + * Dec 5 2006 * *------------------------------------------------------------------------- */ @@ -1175,15 +1150,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_iterate + * Function: H5A__dense_iterate * - * Purpose: Iterate over attributes in dense storage structures for an object + * Purpose: Iterate over attributes in dense storage structures for an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 5 2006 + * Programmer: Quincey Koziol + * Dec 5 2006 * *------------------------------------------------------------------------- */ @@ -1201,9 +1175,7 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(H5F_addr_defined(ainfo->fheap_addr)); @@ -1312,15 +1284,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_remove_bt2_cb + * Function: H5A__dense_remove_bt2_cb * - * Purpose: v2 B-tree callback for dense attribute storage record removal + * Purpose: v2 B-tree callback for dense attribute storage record removal * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -1376,15 +1347,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_remove + * Function: H5A__dense_remove * - * Purpose: Remove an attribute from the dense storage of an object + * Purpose: Remove an attribute from the dense storage of an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -1401,9 +1371,7 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(name && *name); @@ -1466,15 +1434,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_remove_by_idx_bt2_cb + * Function: H5A__dense_remove_by_idx_bt2_cb * - * Purpose: v2 B-tree callback for dense attribute storage record removal by index + * Purpose: v2 B-tree callback for dense attribute storage record removal by index * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 14 2007 + * Programmer: Quincey Koziol + * Feb 14 2007 * *------------------------------------------------------------------------- */ @@ -1591,16 +1558,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_remove_by_idx + * Function: H5A__dense_remove_by_idx * - * Purpose: Remove an attribute from the dense storage of an object, - * according to the order within an index + * Purpose: Remove an attribute from the dense storage of an object, + * according to the order within an index * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 14 2007 + * Programmer: Quincey Koziol + * Feb 14 2007 * *------------------------------------------------------------------------- */ @@ -1617,9 +1583,7 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); @@ -1721,16 +1685,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_exists + * Function: H5A__dense_exists * - * Purpose: Check if an attribute exists in dense storage structures for + * Purpose: Check if an attribute exists in dense storage structures for * an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -1746,9 +1709,7 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); HDassert(name); @@ -1810,15 +1771,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_delete_bt2_cb + * Function: H5A__dense_delete_bt2_cb * - * Purpose: v2 B-tree callback for dense attribute storage deletion + * Purpose: v2 B-tree callback for dense attribute storage deletion * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jan 3 2007 + * Programmer: Quincey Koziol + * Jan 3 2007 * *------------------------------------------------------------------------- */ @@ -1874,15 +1834,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_delete + * Function: H5A__dense_delete * - * Purpose: Delete all dense storage structures for attributes on an object + * Purpose: Delete all dense storage structures for attributes on an object * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 6 2006 + * Programmer: Quincey Koziol + * Dec 6 2006 * *------------------------------------------------------------------------- */ @@ -1895,9 +1854,7 @@ H5A__dense_delete(H5F_t *f, H5O_ainfo_t *ainfo) FUNC_ENTER_PACKAGE - /* - * Check arguments. - */ + /* Check arguments */ HDassert(f); HDassert(ainfo); diff --git a/src/H5Aint.c b/src/H5Aint.c index f923e24..57fc8d9 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -120,7 +120,7 @@ const unsigned H5O_attr_ver_bounds[] = { /* Local Variables */ /*******************/ -typedef H5A_t* H5A_t_ptr; +typedef H5A_t* H5A_t_ptr; H5FL_SEQ_DEFINE(H5A_t_ptr); @@ -232,9 +232,9 @@ H5A__create(const H5G_loc_t *loc, const char *name, const H5T_t *type, * SOHM table */ if(H5SM_try_share(attr->oloc.file, NULL, 0, H5O_DTYPE_ID, attr->shared->dt, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share datatype failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share datatype failed") if(H5SM_try_share(attr->oloc.file, NULL, 0, H5O_SDSPACE_ID, attr->shared->ds, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share dataspace failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share dataspace failed") /* Check whether datatype is committed & increment ref count * (to maintain ref. count incr/decr similarity with "shared message" @@ -287,14 +287,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__create_by_name + * Function: H5A__create_by_name * - * Purpose: Create an attribute on object, according to it's name + * Purpose: Create an attribute on object, according to it's name * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * December 6, 2017 + * Programmer: Quincey Koziol + * December 6, 2017 * *------------------------------------------------------------------------- */ @@ -303,8 +303,8 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr const H5T_t *type, const H5S_t *space, hid_t acpl_id) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -348,20 +348,19 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__open_common + * Function: H5A__open_common * - * Purpose: - * Finishes initializing an attributes the open + * Purpose: Finishes initializing an attributes the open * * Usage: * herr_t H5A__open_common(loc, name) * const H5G_loc_t *loc; IN: Pointer to group location for object * H5A_t *attr; IN/OUT: Pointer to attribute to initialize * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * December 18, 2006 + * Programmer: Quincey Koziol + * December 18, 2006 * *------------------------------------------------------------------------- */ @@ -409,7 +408,7 @@ done: * * Purpose: Open an attribute in an object header * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * December 9, 2017 @@ -450,11 +449,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__open_by_idx + * Function: H5A__open_by_idx * - * Purpose: Open an attribute according to its index order + * Purpose: Open an attribute according to its index order * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * April 2, 1998 @@ -514,11 +513,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__open_by_name + * Function: H5A__open_by_name * - * Purpose: Open an attribute in an object header, according to it's name + * Purpose: Open an attribute in an object header, according to it's name * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * December 11, 2006 @@ -529,8 +528,8 @@ H5A_t * H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -674,7 +673,7 @@ done: if(tconv_buf) tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf); if(bkg_buf) - bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf); + bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf); FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5A__read() */ @@ -770,7 +769,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) if(NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, dst_type_size * nelmts))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") - /* Copy the attribute data into the user's buffer */ + /* Copy the attribute data into the attribute data buffer */ H5MM_memcpy(attr->shared->data, buf, (dst_type_size * nelmts)); } /* end else */ @@ -814,7 +813,7 @@ ssize_t H5A__get_name(H5A_t *attr, size_t buf_size, char *buf) { size_t copy_len, nbytes; - ssize_t ret_value = -1; /* Return value */ + ssize_t ret_value = -1; /* Return value */ FUNC_ENTER_PACKAGE_NOERR @@ -883,8 +882,7 @@ done: * Purpose: Returns an ID for the datatype of an attribute * * Return: Success: A valid ID for the datatype of an attribute - * - * Failure: H5I_INVALID_HID + * Failure: H5I_INVALID_HID * *------------------------------------------------------------------------- */ @@ -922,8 +920,9 @@ H5A__get_type(H5A_t *attr) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype") done: - if(H5I_INVALID_HID == ret_value && dt && (H5T_close(dt) < 0)) - HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release datatype") + if(H5I_INVALID_HID == ret_value) + if(dt && H5T_close(dt) < 0) + HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release datatype") FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__get_type() */ @@ -960,7 +959,7 @@ H5A__get_create_plist(H5A_t* attr) /* Create the property list object to return */ if((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties") if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") @@ -1017,21 +1016,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__copy - * - * Purpose: Copies attribute OLD_ATTR. + * Function: H5A__copy * - * Return: Success: Pointer to a new copy of the OLD_ATTR argument. + * Purpose: Copies attribute OLD_ATTR. * - * Failure: NULL + * Return: Success: Pointer to a new copy of the OLD_ATTR argument. + * Failure: NULL * * Programmer: Robb Matzke * Thursday, December 4, 1997 * - * Modification:Raymond Lu - * 4 June 2008 - * Changed some attribute information to be shared. - * *------------------------------------------------------------------------- */ H5A_t * @@ -1084,18 +1078,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__free + * Function: H5A__free * * Purpose: Frees all memory associated with an attribute, but does not * free the H5A_t structure (which should be done in H5T_close). * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * Monday, November 15, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t @@ -1131,14 +1123,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__close_cb + * Function: H5A__close_cb * * Purpose: Frees an attribute and all associated memory. * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Sunday, February 18, 1997 + * Return: SUCCEED/FAIL * *------------------------------------------------------------------------- */ @@ -1163,11 +1152,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__close + * Function: H5A__close * - * Purpose: Frees an attribute and all associated memory. + * Purpose: Frees an attribute and all associated memory. * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Robb Matzke * Monday, December 8, 1997 @@ -1216,7 +1205,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_oloc + * Function: H5A_oloc * * Purpose: Return the object location for an attribute. It's the * object location for the object to which the attribute @@ -1248,7 +1237,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A_nameof + * Function: H5A_nameof * * Purpose: Return the group hier. path for an attribute. It's the * group hier. path for the object to which the attribute @@ -1310,12 +1299,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__exists_by_name + * Function: H5A__exists_by_name * * Purpose: Private version of H5Aexists_by_name * - * Return: Success: TRUE/FALSE - * Failure: Negative + * Return: TRUE/FALSE/FAIL * * Programmer: Quincey Koziol * Thursday, November 1, 2007 @@ -1365,7 +1353,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Dec 18 2006 * * Modification:Raymond Lu @@ -1418,19 +1405,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__compact_build_table + * Function: H5A__compact_build_table * * Purpose: Builds a table containing a sorted list of attributes for * an object * - * Note: Used for building table of attributes in non-native iteration + * Note: Used for building table of attributes in non-native iteration * order for an index * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 18, 2006 + * Programmer: Quincey Koziol + * Dec 18, 2006 * *------------------------------------------------------------------------- */ @@ -1487,11 +1473,9 @@ done: * Purpose: Callback routine for building table of attributes from dense * attribute storage. * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Dec 11 2006 * *------------------------------------------------------------------------- @@ -1526,7 +1510,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__dense_build_table + * Function: H5A__dense_build_table * * Purpose: Builds a table containing a sorted list of attributes for * an object @@ -1535,8 +1519,7 @@ done: * order for an index. Uses the "name" index to retrieve records, * but the 'idx_type' index for sorting them. * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * Dec 11, 2006 @@ -1612,19 +1595,18 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__attr_cmp_name_inc + * Function: H5A__attr_cmp_name_inc * - * Purpose: Callback routine for comparing two attribute names, in + * Purpose: Callback routine for comparing two attribute names, in * increasing alphabetic order * - * Return: An integer less than, equal to, or greater than zero if the + * Return: An integer less than, equal to, or greater than zero if the * first argument is considered to be respectively less than, * equal to, or greater than the second. If two members compare * as equal, their order in the sorted array is undefined. * (i.e. same as strcmp()) * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Dec 11 2006 * *------------------------------------------------------------------------- @@ -1652,7 +1634,6 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2) * (i.e. opposite of strcmp()) * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Feb 8 2007 * *------------------------------------------------------------------------- @@ -1679,7 +1660,6 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2) * as equal, their order in the sorted array is undefined. * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Feb 8 2007 * *------------------------------------------------------------------------- @@ -1703,19 +1683,18 @@ H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2) /*------------------------------------------------------------------------- - * Function: H5A__attr_cmp_corder_dec + * Function: H5A__attr_cmp_corder_dec * - * Purpose: Callback routine for comparing two attributes, in + * Purpose: Callback routine for comparing two attributes, in * decreasing creation order * - * Return: An integer less than, equal to, or greater than zero if the + * Return: An integer less than, equal to, or greater than zero if the * second argument is considered to be respectively less than, * equal to, or greater than the first. If two members compare * as equal, their order in the sorted array is undefined. * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 8 2007 + * Programmer: Quincey Koziol + * Feb 8 2007 * *------------------------------------------------------------------------- */ @@ -1738,15 +1717,14 @@ H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2) /*------------------------------------------------------------------------- - * Function: H5A__attr_sort_table + * Function: H5A__attr_sort_table * * Purpose: Sort table containing a list of attributes for an object * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 11, 2006 + * Programmer: Quincey Koziol + * Dec 11, 2006 * *------------------------------------------------------------------------- */ @@ -1783,16 +1761,15 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, /*------------------------------------------------------------------------- - * Function: H5A__attr_iterate_table + * Function: H5A__attr_iterate_table * * Purpose: Iterate over table containing a list of attributes for an object, * making appropriate callbacks * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 18, 2006 + * Programmer: Quincey Koziol + * Dec 18, 2006 * *------------------------------------------------------------------------- */ @@ -1866,22 +1843,21 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__attr_release_table + * Function: H5A__attr_release_table * - * Purpose: Release table containing a list of attributes for an object + * Purpose: Release table containing a list of attributes for an object * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 11, 2006 + * Programmer: Quincey Koziol + * Dec 11, 2006 * *------------------------------------------------------------------------- */ herr_t H5A__attr_release_table(H5A_attr_table_t *atable) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1913,11 +1889,9 @@ done: * Purpose: Retrieves the "attribute info" message for an object. Also * sets the number of attributes correctly, if it isn't set up yet. * - * Return: Success: TRUE/FALSE whether message was found & retrieved - * Failure: FAIL if error occurred + * Return: TRUE/FALSE/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Mar 11 2007 * *------------------------------------------------------------------------- @@ -1937,11 +1911,11 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo) /* Check if the "attribute info" message exists */ if((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header") if(ret_value > 0) { /* Retrieve the "attribute info" structure */ if(NULL == H5O_msg_read_oh(f, oh, H5O_AINFO_ID, ainfo)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message") /* Check if we don't know how many attributes there are */ if(ainfo->nattrs == HSIZET_MAX) { @@ -1978,11 +1952,9 @@ done: * Chooses the oldest version possible, unless the * file's low bound indicates otherwise. * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Jul 17 2007 * *------------------------------------------------------------------------- @@ -2056,7 +2028,7 @@ done: */ H5A_t * H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size, - H5O_copy_t *cpy_info) + H5O_copy_t H5_ATTR_NDEBUG_UNUSED *cpy_info) { H5A_t *attr_dst = NULL; /* Destination attribute */ hid_t tid_src = -1; /* Datatype ID for source datatype */ @@ -2119,7 +2091,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s */ if(H5O_msg_reset_share(H5O_DTYPE_ID, attr_dst->shared->dt) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset datatype sharing") - } /* end if */ + } /* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied. * Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */ @@ -2137,9 +2109,9 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s * committed or sharing is disabled. */ if(H5SM_try_share(file_dst, NULL, H5SM_DEFER, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype") if(H5SM_try_share(file_dst, NULL, H5SM_DEFER, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace") /* Compute the sizes of the datatype and dataspace. This is their raw * size unless they're shared. @@ -2243,10 +2215,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s H5MM_memcpy(buf, attr_src->shared->data, attr_src->shared->data_size); - /* Allocate background memory */ - if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) - if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed") + /* Allocate background memory */ + if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) + if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed") /* Convert from source file to memory */ if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0) @@ -2254,9 +2226,9 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s H5MM_memcpy(reclaim_buf, buf, buf_size); - /* Set background buffer to all zeros */ - if(bkg_buf) - HDmemset(bkg_buf, 0, buf_size); + /* Set background buffer to all zeros */ + if(bkg_buf) + HDmemset(bkg_buf, 0, buf_size); /* Convert from memory to destination file */ if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0) @@ -2326,7 +2298,7 @@ done: * an object may have a reference attribute that points to the * object itself. * - * Return: Non-negative on success/Negative on failure + * Return: SUCCEED/FAIL * * Programmer: Peter Cao * March 6, 2005 @@ -2374,7 +2346,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, /* Update shared message info from named datatype info */ H5T_update_shared(attr_dst->shared->dt); - } /* end if */ + } /* Try to share both the datatype and dataset. This does nothing if the * datatype is committed or sharing is disabled. @@ -2477,11 +2449,9 @@ done: * * Purpose: Copy all dense attributes from SRC to DST. * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Peter Cao - * xcao@hdfgroup.org * July 20, 2007 * *------------------------------------------------------------------------- @@ -2521,14 +2491,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__rename_by_name + * Function: H5A__rename_by_name * * Purpose: Private version of H5Arename_by_name * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * February 20, 2007 * *------------------------------------------------------------------------- @@ -2538,10 +2507,10 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na const char *new_attr_name) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2569,14 +2538,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__iterate_common + * Function: H5A__iterate_common * * Purpose: Internal common version of H5Aiterate * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2605,15 +2573,11 @@ H5A__iterate_common(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, /*------------------------------------------------------------------------- - * Function: H5A__iterate + * Function: H5A__iterate * * Purpose: Private version of H5Aiterate2 * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 6, 2017 + * Return: SUCCEED/FAIL * *------------------------------------------------------------------------- */ @@ -2636,19 +2600,18 @@ H5A__iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5A__iterate() */ +} /* end H5A__iterate() */ #ifndef H5_NO_DEPRECATED_SYMBOLS /*------------------------------------------------------------------------- - * Function: H5A__iterate_old + * Function: H5A__iterate_old * * Purpose: Private version of H5Aiterate1 * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2747,14 +2710,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__delete_by_name + * Function: H5A__delete_by_name * * Purpose: Private version of H5Adelete_by_name * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2763,8 +2725,8 @@ herr_t H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2794,14 +2756,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__delete_by_idx + * Function: H5A__delete_by_idx * * Purpose: Private version of H5Adelete_by_idx * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2811,8 +2772,8 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty H5_iter_order_t order, hsize_t n) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5B2.c b/src/H5B2.c index 3f37d25..5c83de2 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -15,7 +15,7 @@ * * Created: H5B2.c * Jan 31 2005 - * Quincey Koziol + * Quincey Koziol * * Purpose: Implements a B-tree, with several modifications from * the "standard" methods. @@ -129,7 +129,6 @@ H5FL_DEFINE_STATIC(H5B2_t); * filled in), negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Jan 31 2005 * *------------------------------------------------------------------------- @@ -200,7 +199,6 @@ done: * NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 15 2009 * *------------------------------------------------------------------------- @@ -220,7 +218,7 @@ H5B2_open(H5F_t *f, haddr_t addr, void *ctx_udata) /* Look up the B-tree header */ if(NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header") /* Check for pending heap deletion */ if(hdr->pending_delete) @@ -264,7 +262,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 2 2005 * *------------------------------------------------------------------------- @@ -307,7 +304,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Dec 23 2015 * *------------------------------------------------------------------------- @@ -379,7 +375,6 @@ done: * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Nov 5 2009 * *------------------------------------------------------------------------- @@ -414,7 +409,6 @@ H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr_p) * Return: Value from callback: non-negative on success, negative on error * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 11 2005 * *------------------------------------------------------------------------- @@ -465,7 +459,6 @@ H5B2_iterate(H5B2_t *bt2, H5B2_operator_t op, void *op_data) * Return: Non-negative (TRUE/FALSE) on success, negative on failure. * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 23 2005 * *------------------------------------------------------------------------- @@ -705,7 +698,6 @@ done: * Return: Non-negative on success, negative on failure. * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 23 2005 * *------------------------------------------------------------------------- @@ -894,7 +886,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 25 2005 * *------------------------------------------------------------------------- @@ -968,7 +959,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Nov 14 2006 * *------------------------------------------------------------------------- @@ -1051,7 +1041,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 25 2005 * *------------------------------------------------------------------------- @@ -1092,7 +1081,6 @@ H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec) * Return: Non-negative on success, negative on failure. * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Mar 8 2005 * *------------------------------------------------------------------------- @@ -1150,7 +1138,6 @@ done: * Return: Non-negative on success, negative on failure. * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Mar 10 2005 * *------------------------------------------------------------------------- @@ -1384,7 +1371,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 15 2009 * *------------------------------------------------------------------------- @@ -1493,7 +1479,6 @@ done: * Return: Non-negative on success, negative on failure. * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Mar 9 2005 * *------------------------------------------------------------------------- diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index 0e3ebd5..b5b1c03 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -87,7 +87,7 @@ */ herr_t H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t obj_addr) + const H5B2_class_t H5_ATTR_NDEBUG_UNUSED *type, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header info */ unsigned u; /* Local index variable */ @@ -182,7 +182,7 @@ done: */ herr_t H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr) + const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_internal_t *internal = NULL; /* B-tree internal node */ @@ -294,7 +294,7 @@ done: */ herr_t H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr) + const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_NDEBUG_UNUSED obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */ diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index e9b6810..9ba8235 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -15,7 +15,7 @@ * * Created: H5B2int.c * Feb 27 2006 - * Quincey Koziol + * Quincey Koziol * * Purpose: Internal routines for managing v2 B-trees. * @@ -101,7 +101,6 @@ H5FL_SEQ_DEFINE(H5B2_node_info_t); * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Feb 2 2005 * *------------------------------------------------------------------------- @@ -230,7 +229,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 27 2009 * *------------------------------------------------------------------------- @@ -276,7 +274,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Mar 21 2006 * *------------------------------------------------------------------------- @@ -355,7 +352,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 13 2009 * *------------------------------------------------------------------------- @@ -391,7 +387,6 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 13 2009 * *------------------------------------------------------------------------- @@ -428,7 +423,6 @@ done: * Return: SUCCEED (Can't fail) * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 27 2009 * *------------------------------------------------------------------------- @@ -456,7 +450,6 @@ H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr) * Return: The file's reference count after the decrement. (Can't fail) * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 27 2009 * *------------------------------------------------------------------------- @@ -485,7 +478,6 @@ H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr) * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Oct 13 2009 * *------------------------------------------------------------------------- @@ -517,14 +509,12 @@ done: * Return: Non-NULL pointer to header on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Dec 18 2015 * *------------------------------------------------------------------------- */ H5B2_hdr_t * -H5B2__hdr_protect(H5F_t *f, haddr_t hdr_addr, void *ctx_udata, - unsigned flags) +H5B2__hdr_protect(H5F_t *f, haddr_t hdr_addr, void *ctx_udata, unsigned flags) { H5B2_hdr_cache_ud_t udata; /* User data for cache callbacks */ H5B2_hdr_t *hdr = NULL; /* v2 B-tree header */ diff --git a/src/H5B2int.c b/src/H5B2int.c index 902253a..53ac835 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -35,6 +35,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5B2pkg.h" /* v2 B-trees */ #include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ #include "H5VMprivate.h" /* Vectors and arrays */ @@ -1572,23 +1573,20 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_ /* Iterate through records, in order */ for(u = 0; u < curr_node->node_nrec && !ret_value; u++) { /* Descend into child node, if current node is an internal node */ - if(depth > 0) { + if(depth > 0) if((ret_value = H5B2__iterate_node(hdr, (uint16_t)(depth - 1), &(node_ptrs[u]), node, op, op_data)) < 0) HERROR(H5E_BTREE, H5E_CANTLIST, "node iteration failed"); - } /* end if */ /* Make callback for current record */ - if(!ret_value) { + if(!ret_value) if((ret_value = (op)(H5B2_NAT_NREC(native, hdr, u), op_data)) < 0) HERROR(H5E_BTREE, H5E_CANTLIST, "iterator function failed"); - } /* end if */ } /* end for */ /* Descend into last child node, if current node is an internal node */ - if(!ret_value && depth > 0) { + if(!ret_value && depth > 0) if((ret_value = H5B2__iterate_node(hdr, (uint16_t)(depth - 1), &(node_ptrs[u]), node, op, op_data)) < 0) HERROR(H5E_BTREE, H5E_CANTLIST, "node iteration failed"); - } /* end if */ done: /* Unpin the node if it was pinned */ diff --git a/src/H5B2internal.c b/src/H5B2internal.c index 54f581e..1fee0af 100644 --- a/src/H5B2internal.c +++ b/src/H5B2internal.c @@ -1355,7 +1355,7 @@ done: *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal) +H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_internal_t *internal) { hsize_t tot_all_nrec; /* Total number of records at or below this node */ uint16_t u, v; /* Local index variables */ @@ -1396,7 +1396,7 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2 *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2) +H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2) { hsize_t tot_all_nrec; /* Total number of records at or below this node */ uint16_t u, v; /* Local index variables */ diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c index beca40c..1fde36d 100644 --- a/src/H5B2leaf.c +++ b/src/H5B2leaf.c @@ -1027,7 +1027,8 @@ done: *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_leaf(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf) +H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, + const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf) { /* General sanity checking on node */ HDassert(leaf->nrec <= hdr->node_info->split_nrec); @@ -1050,7 +1051,7 @@ H5B2__assert_leaf(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf) *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_leaf_t H5_ATTR_UNUSED *leaf2) +H5B2__assert_leaf2(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf, const H5B2_leaf_t H5_ATTR_UNUSED *leaf2) { /* General sanity checking on node */ HDassert(leaf->nrec <= hdr->node_info->split_nrec); diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index 4e033dc..20c6a4d 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -176,13 +176,12 @@ END_FUNC(PKG) /* end H5EA__hdr_debug() */ /*------------------------------------------------------------------------- * Function: H5EA__iblock_debug * - * Purpose: Prints debugging info about a extensible array index block. + * Purpose: Prints debugging info about a extensible array index block. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 11 2008 + * Programmer: Quincey Koziol + * Sep 11 2008 * *------------------------------------------------------------------------- */ @@ -214,7 +213,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde /* Load the extensible array header */ if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") + H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Sanity check */ HDassert(H5F_addr_eq(hdr->idx_blk_addr, addr)); @@ -292,7 +291,7 @@ CATCH if(iblock && H5EA__iblock_unprotect(iblock, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array index block") if(hdr && H5EA__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0) - H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header") + H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header") END_FUNC(PKG) /* end H5EA__iblock_debug() */ @@ -300,13 +299,12 @@ END_FUNC(PKG) /* end H5EA__iblock_debug() */ /*------------------------------------------------------------------------- * Function: H5EA__sblock_debug * - * Purpose: Prints debugging info about a extensible array super block. + * Purpose: Prints debugging info about a extensible array super block. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 30 2008 + * Programmer: Quincey Koziol + * Sep 30 2008 * *------------------------------------------------------------------------- */ @@ -338,7 +336,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, /* Load the extensible array header */ if(NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") + H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header") /* Protect super block */ /* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */ diff --git a/src/H5F.c b/src/H5F.c index 97ee8f3..31e5def 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -344,16 +344,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fis_hdf5 + * Function: H5Fis_hdf5 * - * Purpose: Check the file signature to detect an HDF5 file. + * Purpose: Check the file signature to detect an HDF5 file. * - * Bugs: This function is not robust: it only uses the default file - * driver when attempting to open the file when in fact it - * should use all known file drivers. + * Bugs: This function is not robust: it only uses the default file + * driver when attempting to open the file when in fact it + * should use all known file drivers. * * Return: Success: TRUE/FALSE * Failure: -1 (includes file does not exist) + * *------------------------------------------------------------------------- */ htri_t @@ -439,7 +440,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * the EXCL or TRUNC bit is set. All newly-created files are opened for * reading and writing. */ - if (0 == (flags & (H5F_ACC_EXCL | H5F_ACC_TRUNC))) + if(0 == (flags & (H5F_ACC_EXCL | H5F_ACC_TRUNC))) flags |= H5F_ACC_EXCL; /*default*/ flags |= H5F_ACC_RDWR | H5F_ACC_CREAT; @@ -1261,7 +1262,7 @@ done: * If SECT_INFO is null, this routine returns the total # of free-space * sections. * - * Return: Success: The total # of free space sections + * Return: Success: The total # of free space sections * Failure: -1 *------------------------------------------------------------------------- */ @@ -1731,10 +1732,8 @@ done: /*------------------------------------------------------------------------- * Function: H5Fget_dset_no_attrs_hint * - * Purpose: - * - * Get the file-level setting to create minimized dataset object headers. - * Result is stored at pointer `minimize`. + * Purpose: Get the file-level setting to create minimized dataset object headers. + * Result is stored at pointer `minimize`. * * Return: Success: Non-negative * Failure: Negative diff --git a/src/H5Gent.c b/src/H5Gent.c index 276da73..19aef10 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -32,6 +32,7 @@ #include "H5FLprivate.h" /* Free Lists */ #include "H5Gpkg.h" /* Groups */ #include "H5HLprivate.h" /* Local Heaps */ +#include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/src/H5Gloc.c b/src/H5Gloc.c index 6b1ec24..51728ca 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -141,11 +141,7 @@ static herr_t H5G__loc_get_comment_cb(H5G_loc_t *grp_loc, const char *name, * * Purpose: Given an object ID return a location for the object. * - * Return: Success: Group pointer. - * Failure: NULL - * - * Programmer: Quincey Koziol - * Tuesday, September 13, 2005 + * Returns: SUCCEED/FAIL * *------------------------------------------------------------------------- */ @@ -702,9 +698,9 @@ done: /*------------------------------------------------------------------------- - * Function: H5G_loc_info + * Function: H5G_loc_info * - * Purpose: Retrieve the information for an object from a group location + * Purpose: Retrieve the information for an object from a group location * and path to that object * * Return: Non-negative on success/Negative on failure diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 6ab8305..cd17b0d 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -36,6 +36,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ #include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ /****************/ @@ -690,7 +691,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, } /* end for */ /* Resize the chunk in the cache */ - if(H5O_chunk_resize(oh, chk_proxy) < 0) + if(H5O__chunk_resize(oh, chk_proxy) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk") /* Set new message index */ @@ -2523,7 +2524,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno) HDassert(new_size <= old_size); /* Resize the chunk in the cache */ - if(H5O_chunk_resize(oh, chk_proxy) < 0) + if(H5O__chunk_resize(oh, chk_proxy) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk") /* Free the unused space in the file */ diff --git a/src/H5Obogus.c b/src/H5Obogus.c index f10268e..f3cca0f 100644 --- a/src/H5Obogus.c +++ b/src/H5Obogus.c @@ -75,7 +75,7 @@ const H5O_msg_class_t H5O_MSG_BOGUS_INVALID[1] = {{ 0, /*native message size */ H5O_SHARE_IS_SHARABLE, /* messages are sharable? */ H5O__bogus_decode, /*decode message */ - H5O__bogus_encode, /*encode message */ + H5O_bogus_encode, /*encode message */ NULL, /*copy the native value */ H5O_bogus_size, /*raw message size */ NULL, /*free internal memory */ diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index ccaf46c..cb31cec 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -15,7 +15,7 @@ * * Created: H5Ochunk.c * Jul 13 2008 - * Quincey Koziol + * Quincey Koziol * * Purpose: Object header chunk routines. * @@ -77,15 +77,13 @@ H5FL_DEFINE(H5O_chunk_proxy_t); /*------------------------------------------------------------------------- - * Function: H5O__chunk_add + * Function: H5O__chunk_add * - * Purpose: Add new chunk for object header to metadata cache + * Purpose: Add new chunk for object header to metadata cache * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Jul 13 2008 * *------------------------------------------------------------------------- @@ -107,7 +105,7 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno) /* Allocate space for the object header data structure */ if(NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* Increment reference count on object header */ if(H5O__inc_rc(oh) < 0) @@ -128,6 +126,7 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno) /* Insert the chunk proxy into the cache */ if(H5AC_insert_entry(f, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk") + chk_proxy = NULL; done: @@ -146,15 +145,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__chunk_protect + * Function: H5O__chunk_protect * - * Purpose: Protect an object header chunk for modifications + * Purpose: Protect an object header chunk for modifications * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Jul 17 2008 * *------------------------------------------------------------------------- @@ -221,15 +218,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__chunk_unprotect + * Function: H5O__chunk_unprotect * - * Purpose: Unprotect an object header chunk after modifications + * Purpose: Unprotect an object header chunk after modifications * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Jul 17 2008 * *------------------------------------------------------------------------- @@ -273,25 +268,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5O_chunk_resize + * Function: H5O__chunk_resize * - * Purpose: Resize an object header chunk + * Purpose: Resize an object header chunk * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * May 6 2010 * *------------------------------------------------------------------------- */ herr_t -H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy) +H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_PACKAGE /* check args */ HDassert(oh); @@ -311,19 +304,17 @@ H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_chunk_resize() */ +} /* end H5O__chunk_resize() */ /*------------------------------------------------------------------------- - * Function: H5O__chunk_update_idx + * Function: H5O__chunk_update_idx * - * Purpose: Update the chunk index for a chunk proxy + * Purpose: Update the chunk index for a chunk proxy * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Jul 13 2008 * *------------------------------------------------------------------------- @@ -362,20 +353,18 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk") done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O__chunk_update_idx() */ /*------------------------------------------------------------------------- - * Function: H5O__chunk_delete + * Function: H5O__chunk_delete * - * Purpose: Notify metadata cache that a chunk has been deleted + * Purpose: Notify metadata cache that a chunk has been deleted * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Jul 13 2008 * *------------------------------------------------------------------------- @@ -413,15 +402,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__chunk_dest + * Function: H5O__chunk_dest * - * Purpose: Destroy a chunk proxy object + * Purpose: Destroy a chunk proxy object * - * Return: Success: SUCCEED - * Failure: FAIL + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * July 13, 2008 * *------------------------------------------------------------------------- diff --git a/src/H5Ocont.c b/src/H5Ocont.c index 2eb27d6..68a88e2 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -15,7 +15,7 @@ * * Created: H5Ocont.c * Aug 6 1997 - * Robb Matzke + * Robb Matzke * * Purpose: The object header continuation message. This * message is only generated and read from within @@ -36,10 +36,10 @@ /* PRIVATE PROTOTYPES */ -static void *H5O_cont_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, +static void *H5O__cont_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); -static herr_t H5O_cont_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); -static size_t H5O_cont_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); +static herr_t H5O__cont_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); +static size_t H5O__cont_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); static herr_t H5O__cont_free(void *mesg); static herr_t H5O__cont_delete(H5F_t *f, H5O_t *open_oh, void *_mesg); static herr_t H5O__cont_debug(H5F_t *f, const void *_mesg, FILE * stream, @@ -51,10 +51,10 @@ const H5O_msg_class_t H5O_MSG_CONT[1] = {{ "hdr continuation", /*message name for debugging */ sizeof(H5O_cont_t), /*native message size */ 0, /* messages are sharable? */ - H5O_cont_decode, /*decode message */ - H5O_cont_encode, /*encode message */ + H5O__cont_decode, /*decode message */ + H5O__cont_encode, /*encode message */ NULL, /*no copy method */ - H5O_cont_size, /*size of header continuation */ + H5O__cont_size, /*size of header continuation */ NULL, /*reset method */ H5O__cont_free, /* free method */ H5O__cont_delete, /* file delete method */ @@ -74,7 +74,7 @@ H5FL_DEFINE(H5O_cont_t); /*------------------------------------------------------------------------- - * Function: H5O_cont_decode + * Function: H5O__cont_decode * * Purpose: Decode the raw header continuation message. * @@ -83,20 +83,19 @@ H5FL_DEFINE(H5O_cont_t); * Failure: NULL * * Programmer: Robb Matzke - * matzke@llnl.gov * Aug 6 1997 * *------------------------------------------------------------------------- */ static void * -H5O_cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, +H5O__cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_cont_t *cont = NULL; void *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC /* check args */ HDassert(f); @@ -116,28 +115,27 @@ H5O_cont_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_cont_decode() */ +} /* end H5O__cont_decode() */ /*------------------------------------------------------------------------- - * Function: H5O_cont_encode + * Function: H5O__cont_encode * * Purpose: Encodes a continuation message. * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * matzke@llnl.gov * Aug 7 1997 * *------------------------------------------------------------------------- */ static herr_t -H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) +H5O__cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_cont_t *cont = (const H5O_cont_t *) _mesg; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* check args */ HDassert(f); @@ -151,11 +149,11 @@ H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con H5F_ENCODE_LENGTH(f, p, cont->size); FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5O_cont_encode() */ +} /* end H5O__cont_encode() */ /*------------------------------------------------------------------------- - * Function: H5O_cont_size + * Function: H5O__cont_size * * Purpose: Returns the size of the raw message in bytes not counting * the message type or size fields, but only the data fields. @@ -166,24 +164,23 @@ H5O_cont_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con * Failure: zero * * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu * Sep 6 2005 * *------------------------------------------------------------------------- */ static size_t -H5O_cont_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg) +H5O__cont_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg) { size_t ret_value = 0; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* Set return value */ ret_value = (size_t)(H5F_SIZEOF_ADDR(f) + /* Continuation header address */ H5F_SIZEOF_SIZE(f)); /* Continuation header length */ FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_cont_size() */ +} /* end H5O__cont_size() */ /*------------------------------------------------------------------------- @@ -253,11 +250,8 @@ done: * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * matzke@llnl.gov * Aug 6 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 833d096..d77bd54 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -592,10 +592,9 @@ H5_DLL herr_t H5O__delete_mesg(H5F_t *f, H5O_t *open_oh, H5O_mesg_t *mesg); /* Object header chunk routines */ H5_DLL herr_t H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno); H5_DLL H5O_chunk_proxy_t *H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx); -H5_DLL herr_t H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, - hbool_t chk_dirtied); +H5_DLL herr_t H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t chk_dirtied); H5_DLL herr_t H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx); -H5_DLL herr_t H5O_chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy); +H5_DLL herr_t H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy); H5_DLL herr_t H5O__chunk_delete(H5F_t *f, H5O_t *oh, unsigned idx); H5_DLL herr_t H5O__chunk_dest(H5O_chunk_proxy_t *chunk_proxy); @@ -638,7 +637,8 @@ H5_DLL herr_t H5O__attr_link(H5F_t *f, H5O_t *open_oh, void *_mesg); H5_DLL herr_t H5O_attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs); /* Arrays of versions for: - Object header, Attribute/Fill value/Filter pipeline messages */ + * Object header, Attribute/Fill value/Filter pipeline messages + */ /* Layout/Datatype/Dataspace arrays of versions are in H5Dpkg.h, H5Tpkg.h and H5Spkg.h */ H5_DLLVAR const unsigned H5O_obj_ver_bounds[H5F_LIBVER_NBOUNDS]; H5_DLLVAR const unsigned H5O_attr_ver_bounds[H5F_LIBVER_NBOUNDS]; @@ -662,8 +662,7 @@ H5_DLL herr_t H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type); #ifdef H5O_DEBUG H5_DLL herr_t H5O_assert(const H5O_t *oh); #endif /* H5O_DEBUG */ -H5_DLL herr_t H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, - int indent, int fwidth); +H5_DLL herr_t H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth); #endif /* _H5Opkg_H */ -- cgit v0.12