summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-11-07 17:11:58 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-11-07 17:11:58 (GMT)
commitc5ca4224967270dadc2d78d2a964f297552f2248 (patch)
tree8f4b9b2d70cb62eaefe255da0f6bbb22b0b42b98
parent21c68f439391b084ca63dbf401dcdf5179c035c1 (diff)
parent8eaa0af30585adbbab29686541cd33e058abd6e8 (diff)
downloadhdf5-c5ca4224967270dadc2d78d2a964f297552f2248.zip
hdf5-c5ca4224967270dadc2d78d2a964f297552f2248.tar.gz
hdf5-c5ca4224967270dadc2d78d2a964f297552f2248.tar.bz2
Merge pull request #138 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:H5Pget_driver_info_retval to develop
Changed the return type of H5Pget_driver_info() from void * to const void * * commit '8eaa0af30585adbbab29686541cd33e058abd6e8': Changed the return type of H5Pget_driver_info() from void * to const void *. Fixes HDFFV-10017.
-rw-r--r--java/src/hdf/hdf5lib/H5.java2
-rw-r--r--src/H5FDmulti.c8
-rw-r--r--src/H5Pfapl.c8
-rw-r--r--src/H5Ppublic.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 7614292..789fea5 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -6915,7 +6915,7 @@ public class H5 implements java.io.Serializable {
// File access property list (FAPL) routines //
// herr_t H5Pset_driver( hid_t plist_id, hid_t new_driver_id, const void *new_driver_info )
- // void *H5Pget_driver_info( hid_t plist_id )
+ // const void *H5Pget_driver_info( hid_t plist_id )
// herr_t H5Pget_multi_type ( hid_t fapl_id, H5FD_mem_t *type )
// herr_t H5Pset_multi_type ( hid_t fapl_id, H5FD_mem_t type )
// herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr);
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 38d0ae3..5e27c53 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -534,7 +534,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
haddr_t *memb_addr/*out*/, hbool_t *relax)
{
- H5FD_multi_fapl_t *fa;
+ const H5FD_multi_fapl_t *fa;
H5FD_mem_t mt;
static const char *func="H5FDget_fapl_multi"; /* Function Name for error reporting */
@@ -548,7 +548,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1)
if(H5FD_MULTI != H5Pget_driver(fapl_id))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1)
- if(NULL == (fa= (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id)))
+ if(NULL == (fa= (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id)))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1)
if (memb_map)
@@ -992,7 +992,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
{
H5FD_multi_t *file=NULL;
hid_t close_fapl=-1;
- H5FD_multi_fapl_t *fa;
+ const H5FD_multi_fapl_t *fa;
H5FD_mem_t m;
static const char *func="H5FD_multi_open"; /* Function Name for error reporting */
@@ -1018,7 +1018,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
if(H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE)<0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error)
}
- fa = (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
+ fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
assert(fa);
ALL_MEMBERS(mt) {
file->fa.memb_map[mt] = fa->memb_map[mt];
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 9309ea9..15662cc 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -875,11 +875,11 @@ done:
*
*-------------------------------------------------------------------------
*/
-void *
+const void *
H5Pget_driver_info(hid_t plist_id)
{
- H5P_genplist_t *plist; /* Property list pointer */
- void *ret_value; /* Return value */
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ const void *ret_value = NULL; /* Return value */
FUNC_ENTER_API(NULL)
H5TRACE1("*x", "i", plist_id);
@@ -888,7 +888,7 @@ H5Pget_driver_info(hid_t plist_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
/* Get the driver info */
- if(NULL == (ret_value = (void *)H5P_peek_driver_info(plist)))
+ if(NULL == (ret_value = (const void *)H5P_peek_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver info")
done:
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index fc902a8..1f0d734 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -311,7 +311,7 @@ H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold/*out*/,
H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id,
const void *driver_info);
H5_DLL hid_t H5Pget_driver(hid_t plist_id);
-H5_DLL void *H5Pget_driver_info(hid_t plist_id);
+H5_DLL const void *H5Pget_driver_info(hid_t plist_id);
H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset);
H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset);
H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type);