summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index c3e9bd6..930a109 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -222,9 +222,9 @@ H5P_dcrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
FUNC_ENTER_NOAPI_NOINIT(H5P_dcrt_copy)
/* Verify property list IDs */
- if(NULL == (dst_plist = H5I_object(dst_plist_id)))
+ if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
- if(NULL == (src_plist = H5I_object(src_plist_id)))
+ if(NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_plist_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
/* Get the fill value, external file list, and data pipeline properties
@@ -302,7 +302,7 @@ H5P_dcrt_close(hid_t dcpl_id, void UNUSED *close_data)
FUNC_ENTER_NOAPI_NOINIT(H5P_dcrt_close)
/* Check arguments */
- if(NULL == (plist = H5I_object(dcpl_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
/* Get the fill value, external file list, and data pipeline properties
@@ -645,7 +645,7 @@ herr_t
H5Pset_layout(hid_t plist_id, H5D_layout_t layout)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pset_layout, FAIL)
H5TRACE2("e", "iDl", plist_id, layout);
@@ -655,7 +655,7 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "raw data layout method is not valid")
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set value */
@@ -692,13 +692,13 @@ H5D_layout_t
H5Pget_layout(hid_t plist_id)
{
H5P_genplist_t *plist; /* Property list pointer */
- H5D_layout_t ret_value=H5D_LAYOUT_ERROR;
+ H5D_layout_t ret_value = H5D_LAYOUT_ERROR;
FUNC_ENTER_API(H5Pget_layout, H5D_LAYOUT_ERROR)
H5TRACE1("Dl", "i", plist_id);
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5D_LAYOUT_ERROR, "can't find object for ID")
/* Get value */
@@ -821,7 +821,7 @@ H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]/*out*/)
H5TRACE3("Is", "iIsx", plist_id, max_ndims, dim);
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
if(H5P_get(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0)
@@ -889,7 +889,7 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size)
hsize_t total, tmp;
H5O_efl_t efl;
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_external, FAIL)
H5TRACE4("e", "i*soh", plist_id, name, offset, size);
@@ -903,7 +903,7 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "zero size")
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
if(H5P_get(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
@@ -921,15 +921,15 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size)
/* Add to the list */
- if (efl.nused >= efl.nalloc) {
+ if(efl.nused >= efl.nalloc) {
size_t na = efl.nalloc + H5O_EFL_ALLOC;
- H5O_efl_entry_t *x = H5MM_realloc (efl.slot, na*sizeof(H5O_efl_entry_t));
+ H5O_efl_entry_t *x = (H5O_efl_entry_t *)H5MM_realloc(efl.slot, na * sizeof(H5O_efl_entry_t));
- if (!x)
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ if(!x)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
efl.nalloc = na;
efl.slot = x;
- }
+ } /* end if */
idx = efl.nused;
efl.slot[idx].name_offset = 0; /*not entered into heap yet*/
efl.slot[idx].name = H5MM_xstrdup (name);
@@ -977,7 +977,7 @@ H5Pget_external_count(hid_t plist_id)
H5TRACE1("Is", "i", plist_id);
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get value */
@@ -985,11 +985,11 @@ H5Pget_external_count(hid_t plist_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list")
/* Set return value */
- ret_value=(int)efl.nused;
+ ret_value = (int)efl.nused;
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_external_count() */
/*-------------------------------------------------------------------------
@@ -1029,33 +1029,33 @@ H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name/*out*
{
H5O_efl_t efl;
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pget_external, FAIL)
H5TRACE6("e", "iIuzxxx", plist_id, idx, name_size, name, offset, size);
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get value */
if(H5P_get(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list")
- if (idx>=efl.nused)
- HGOTO_ERROR (H5E_ARGS, H5E_BADRANGE, FAIL, "external file index is out of range")
+ if(idx >= efl.nused)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "external file index is out of range")
/* Return values */
- if (name_size>0 && name)
- HDstrncpy (name, efl.slot[idx].name, name_size);
- if (offset)
+ if(name_size>0 && name)
+ HDstrncpy(name, efl.slot[idx].name, name_size);
+ if(offset)
*offset = efl.slot[idx].offset;
- if (size)
+ if(size)
*size = efl.slot[idx].size;
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_external() */
/*-------------------------------------------------------------------------
@@ -1177,7 +1177,7 @@ H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied")
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Modify the filter parameters of the I/O pipeline */
@@ -1252,7 +1252,7 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied")
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get the pipeline property to append to */
@@ -1862,7 +1862,7 @@ H5Pset_shuffle(hid_t plist_id)
HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
/* Get the plist structure */
- if(NULL == (plist = H5I_object(plist_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Add the filter */
@@ -1908,7 +1908,7 @@ H5Pset_nbit(hid_t plist_id)
HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
/* Get the plist structure */
- if(NULL == (plist = H5I_object(plist_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Add the nbit filter */
@@ -1974,7 +1974,7 @@ H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_fac
HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "invalid scale type")
/* Get the plist structure */
- if(NULL == (plist = H5I_object(plist_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set parameters for the filter
@@ -2093,12 +2093,12 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
H5T_path_t *tpath; /* Conversion information */
/* Retrieve pointer to datatype */
- if(NULL == (type = H5I_object_verify(type_id, H5I_DATATYPE)))
+ if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Set the fill value */
if(NULL == (fill.type = H5T_copy(type, H5T_COPY_TRANSIENT)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy datatype")
fill.size = H5T_get_size(type);
if(NULL == (fill.buf = H5MM_malloc((size_t)fill.size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for fill value")
@@ -2119,13 +2119,13 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
/* Convert the fill value */
if(H5T_convert(tpath, type_id, type_id, (size_t)1, (size_t)0, (size_t)0, fill.buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {
if(bkg_buf)
- H5FL_BLK_FREE(type_conv, bkg_buf);
+ (void)H5FL_BLK_FREE(type_conv, bkg_buf);
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
} /* end if */
/* Release the background buffer */
if(bkg_buf)
- H5FL_BLK_FREE(type_conv, bkg_buf);
+ (void)H5FL_BLK_FREE(type_conv, bkg_buf);
} /* end if */
} /* end if */
else
@@ -2262,7 +2262,7 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/)
H5TRACE3("e", "iix", plist_id, type_id, value);
/* Check arguments */
- if(NULL == (type = H5I_object_verify(type_id, H5I_DATATYPE)))
+ if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if(!value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,"no fill value output buffer")