diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-12-06 20:40:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-12-06 20:40:12 (GMT) |
commit | 211baa5e46802352cac761533f3f9a0749f1dd6c (patch) | |
tree | edbc0a099b27bbdc25bac11c3a925270b52b5cf8 /src/H5D.c | |
parent | f00ad1c5d6c592d9f559fbb5b39a45db28ba23aa (diff) | |
download | hdf5-211baa5e46802352cac761533f3f9a0749f1dd6c.zip hdf5-211baa5e46802352cac761533f3f9a0749f1dd6c.tar.gz hdf5-211baa5e46802352cac761533f3f9a0749f1dd6c.tar.bz2 |
[svn-r7918] Purpose:
Code cleanup
Description:
Clean up compiler warnings, especially the 'FUNC' variable not used which
comes out in production mode.
Solution:
Had to add a new FUNC_ENTER_NOAPI_NOINIT_NOFUNC macro for those non-API
functions which don't need the 'FUNC' variable defined. (This will be _so_
much easier when C99 is standard on all our supposed platforms, since it has a
__FUNC__ macro... )
Platforms tested:
FreeBSD 4.9 (sleipnir)
too minor for h5committest (although there were lots of files changed, the
change was minor in each one)
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 32 |
1 files changed, 14 insertions, 18 deletions
@@ -194,7 +194,7 @@ H5D_init_interface(void) size_t nprops; /* Number of properties */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOINIT(H5D_init_interface); + FUNC_ENTER_NOAPI_NOINIT(H5D_init_interface); /* Initialize the atom group for the dataset IDs */ if (H5I_init_group(H5I_DATASET, H5I_DATASETID_HASHSIZE, H5D_RESERVED_ATOMS, (H5I_free_t)H5D_close)<0) @@ -404,7 +404,7 @@ H5D_term_interface(void) { int n=0; - FUNC_ENTER_NOINIT(H5D_term_interface); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_term_interface); if (interface_initialize_g) { if ((n=H5I_nmembers(H5I_DATASET))) { @@ -1019,7 +1019,7 @@ static herr_t H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation, hsize_t full_size; /* The number of bytes in the dataset when fully populated */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOINIT(H5D_get_space_status); + FUNC_ENTER_NOAPI_NOINIT(H5D_get_space_status); assert(dset); @@ -2358,8 +2358,8 @@ done: H5G_entry_t * H5D_entof (H5D_t *dataset) { - /* Use FUNC_ENTER_NOINIT here to avoid performance issues */ - FUNC_ENTER_NOINIT(H5D_entof); + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_entof); FUNC_LEAVE_NOAPI( dataset ? &(dataset->ent) : NULL); } @@ -2385,8 +2385,8 @@ H5D_entof (H5D_t *dataset) H5T_t * H5D_typeof (H5D_t *dset) { - /* Use FUNC_ENTER_NOINIT here to avoid performance issues */ - FUNC_ENTER_NOINIT(H5D_typeof); + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_typeof); assert (dset); assert (dset->type); @@ -2414,8 +2414,8 @@ H5D_typeof (H5D_t *dset) static H5F_t * H5D_get_file (const H5D_t *dset) { - /* Use FUNC_ENTER_NOINIT here to avoid performance issues */ - FUNC_ENTER_NOINIT(H5D_get_file); + /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_get_file); assert (dset); assert (dset->ent.file); @@ -2451,7 +2451,7 @@ H5D_alloc_storage (H5F_t *f, hid_t dxpl_id, H5D_t *dset/*in,out*/, H5D_time_allo unsigned addr_set=0; /* Flag to indicate that the dataset's storage address was set */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOINIT(H5D_alloc_storage); + FUNC_ENTER_NOAPI_NOINIT(H5D_alloc_storage); /* check args */ assert (f); @@ -2598,10 +2598,9 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id) hssize_t snpoints; /* Number of points in space (for error checking) */ size_t npoints; /* Number of points in space */ H5S_t *space; /* Dataset's dataspace */ - H5P_genplist_t *plist; /* Property list */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOINIT(H5D_init_storage); + FUNC_ENTER_NOAPI_NOINIT(H5D_init_storage); assert(dset); @@ -2630,12 +2629,8 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id) /* Don't write default fill values to external files */ /* If we will be immediately overwriting the values, don't bother to clear them */ if((dset->efl.nused==0 || dset->fill.buf) && !full_overwrite) { - /* Get dataset's creation property list */ - if (NULL == (plist = H5I_object(dset->dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list"); - if (H5F_contig_fill(dset->ent.file, dxpl_id, &(dset->layout), - plist, space, &dset->fill, H5T_get_size(dset->type))<0) + space, &dset->fill, H5T_get_size(dset->type))<0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset"); } /* end if */ break; @@ -2646,7 +2641,7 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id) * for all chunks now and initialize each chunk with the fill value. */ { - /* We only handle simple data spaces so far */ + H5P_genplist_t *plist; /* Property list */ int ndims; hsize_t dim[H5O_LAYOUT_NDIMS]; @@ -2654,6 +2649,7 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id) if (NULL == (plist = H5I_object(dset->dcpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list"); + /* We only handle simple data spaces so far */ if ((ndims=H5S_get_simple_extent_dims(space, dim, NULL))<0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get simple data space info"); dim[ndims] = dset->layout.dim[ndims]; |