diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmulti.c | 8 | ||||
-rw-r--r-- | src/H5Pfapl.c | 8 | ||||
-rw-r--r-- | src/H5Ppublic.h | 2 |
3 files changed, 9 insertions, 9 deletions
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); |