summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-06-07 10:12:36 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-06-07 10:12:36 (GMT)
commit87695c999ad7ea348ee6dc03b46b0bd345f7d7df (patch)
tree91dac228fd01ace80b8c6a9cef746ced880c27df /src
parent8a2c6d868b70c56622e65cb46e163d2856e1098e (diff)
downloadhdf5-87695c999ad7ea348ee6dc03b46b0bd345f7d7df.zip
hdf5-87695c999ad7ea348ee6dc03b46b0bd345f7d7df.tar.gz
hdf5-87695c999ad7ea348ee6dc03b46b0bd345f7d7df.tar.bz2
Minor normalizations with HDF5 1.10.
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c63
-rw-r--r--src/H5Fint.c4
-rw-r--r--src/H5Fprivate.h11
-rw-r--r--src/H5Fquery.c1
-rw-r--r--src/H5MF.c3
-rw-r--r--src/H5PB.c2
6 files changed, 38 insertions, 46 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 1a9bab5..3dbd292 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -280,7 +280,7 @@ H5Fget_create_plist(hid_t file_id)
/* Retrieve the file creation property list */
if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FCPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties")
done:
FUNC_LEAVE_API(ret_value)
@@ -320,7 +320,7 @@ H5Fget_access_plist(hid_t file_id)
/* Retrieve the file's access property list */
if(H5VL_file_get(vol_obj, H5VL_FILE_GET_FAPL, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list")
done:
FUNC_LEAVE_API(ret_value)
@@ -584,8 +584,8 @@ done:
*
* Purpose: Check if the file can be opened with the given fapl.
*
- * Return: Succeed: TRUE/FALSE
- * Failure: FAIL (includes file does not exist)
+ * Return: Success: TRUE/FALSE
+ * Failure: -1 (includes file does not exist)
*
*-------------------------------------------------------------------------
*/
@@ -820,8 +820,7 @@ done:
* not remove them from the cache. The OBJECT_ID can be a file,
* dataset, group, attribute, or named data type.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -863,8 +862,8 @@ done:
* closed until those objects are closed; however, all data for
* the file and the open objects is flushed.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -879,11 +878,9 @@ H5Fclose(hid_t file_id)
if(H5I_FILE != H5I_get_type(file_id))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID")
- /* Decrement reference count on atom. When it reaches zero the file will
- * be closed.
- */
+ /* Close the file */
if(H5I_dec_app_ref(file_id) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "closing file ID failed")
done:
FUNC_LEAVE_API(ret_value)
@@ -1011,8 +1008,7 @@ done:
* Purpose: Public API to retrieve the file's 'intent' flags passed
* during H5Fopen()
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1117,8 +1113,8 @@ done:
* is called after an existing file is opened in order
* to learn the true size of the underlying file.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Success: Non-negative
+ * Failure: Negative
*-------------------------------------------------------------------------
*/
herr_t
@@ -1622,14 +1618,14 @@ done:
* set up flush dependency/proxy even for file opened without
* SWMR to resolve issues with opened objects.
*
- * Return: SUCCEED/FAIL
+ * Return: Non-negative on success/negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5Fstart_swmr_write(hid_t file_id)
{
- H5VL_object_t *vol_obj = NULL; /* File info */
+ H5VL_object_t *vol_obj = NULL; /* File info */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1658,8 +1654,7 @@ done:
* Purpose: Start metadata cache logging operations for a file.
* - Logging must have been set up via the fapl.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on errors
*-------------------------------------------------------------------------
*/
herr_t
@@ -1691,8 +1686,7 @@ done:
* - Does not close the log file.
* - Logging must have been set up via the fapl.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on errors
*-------------------------------------------------------------------------
*/
herr_t
@@ -1724,8 +1718,7 @@ done:
* set up via the fapl. is_currently_logging determines if
* log messages are being recorded at this time.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on errors
*-------------------------------------------------------------------------
*/
herr_t
@@ -1759,8 +1752,7 @@ done:
* H5Fset_latest_format() starting release 1.10.2.
* See explanation for H5Fset_latest_format() in H5Fdeprec.c.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1796,8 +1788,7 @@ done:
* downgrade persistent file space to non-persistent
* for 1.8 library.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1831,8 +1822,7 @@ done:
*
* Purpose: Resets statistics for the page buffer layer.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1862,8 +1852,7 @@ done:
*
* Purpose: Retrieves statistics for the page buffer layer.
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1901,8 +1890,7 @@ done:
* image_len: --size of the on disk metadata cache image
* --zero if no cache image
*
- * Return: SUCCEED/FAIL
- *
+ * Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1934,7 +1922,10 @@ done:
* allocated memory in the file.
* (See H5FDget_eoa() in H5FD.c)
*
- * Return: SUCCEED/FAIL
+ * Return: Success: First byte after allocated memory.
+ * Failure: HADDR_UNDEF
+ *
+ * Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
@@ -1967,7 +1958,7 @@ done:
*
* Purpose: Set the EOA for the file to the maximum of (EOA, EOF) + increment
*
- * Return: SUCCEED/FAIL
+ * Return: Non-negative on success/Negative on errors
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Fint.c b/src/H5Fint.c
index d50baad..0bda894 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1138,7 +1138,7 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list")
f->shared = H5FL_FREE(H5F_shared_t, f->shared);
- } /* end if */
+ }
/* Free VOL object */
if(f->vol_obj)
@@ -1146,7 +1146,7 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "unable to free VOL object")
f = H5FL_FREE(H5F_t, f);
- } /* end if */
+ }
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__new() */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index fbb164d..c5d4c89 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -25,15 +25,15 @@ typedef struct H5F_t H5F_t;
#include "H5Fpublic.h"
/* Public headers needed by this file */
-#include "H5FDpublic.h" /* File drivers */
+#include "H5FDpublic.h" /* File drivers */
/* Private headers needed by this file */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_PARALLEL
-#include "H5Pprivate.h" /* Property lists */
+#include "H5Pprivate.h" /* Property lists */
#endif /* H5_HAVE_PARALLEL */
-#include "H5VMprivate.h" /* Vectors and arrays */
-#include "H5VLprivate.h" /* Virtual Object Layer */
+#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VLprivate.h" /* Virtual Object Layer */
/**************************/
@@ -795,7 +795,6 @@ H5_DLL hsize_t H5F_get_alignment(const H5F_t *f);
H5_DLL hsize_t H5F_get_threshold(const H5F_t *f);
#ifdef H5_HAVE_PARALLEL
H5_DLL H5P_coll_md_read_flag_t H5F_coll_md_read(const H5F_t *f);
-H5_DLL void H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t flag);
#endif /* H5_HAVE_PARALLEL */
H5_DLL hbool_t H5F_use_mdc_logging(const H5F_t *f);
H5_DLL hbool_t H5F_start_mdc_log_on_access(const H5F_t *f);
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index db01dac..e1b11c8 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -229,6 +229,7 @@ H5F_get_extpath(const H5F_t *f)
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(f);
+ HDassert(f->shared);
HDassert(f->shared->extpath);
FUNC_LEAVE_NOAPI(f->shared->extpath)
diff --git a/src/H5MF.c b/src/H5MF.c
index 5c31f19..fac6620 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1137,10 +1137,11 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN
/* If it's metadata, check if the space to free intersects with the file's
* metadata accumulator
*/
- if(H5FD_MEM_DRAW != alloc_type)
+ if(H5FD_MEM_DRAW != alloc_type) {
/* Check if the space to free intersects with the file's metadata accumulator */
if(H5F__accum_free(f->shared, alloc_type, addr, size) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't check free space intersection w/metadata accumulator")
+ } /* end if */
/* Check if the free space manager for the file has been initialized */
if(!f->shared->fs_man[fs_type]) {
diff --git a/src/H5PB.c b/src/H5PB.c
index 8ac863e..907fe82 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -314,7 +314,7 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un
/* Allocate the new page buffering structure */
if(NULL == (page_buf = H5FL_CALLOC(H5PB_t)))
- HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed")
page_buf->max_size = size;
H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f_sh->fs_page_size, hsize_t);