From f63b2c50ac95fb8363a9b8143d3a3d5f50c58d35 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 26 Apr 2016 14:33:45 -0500 Subject: [svn-r29815] Description: Change 'value' pointer to H5Pset() from 'void *' to 'const void *'. Tested on: MacOSX/64 10.11.4 (amazon) w/serial (h5committest forthcoming) --- src/H5P.c | 8 ++++---- src/H5Pint.c | 2 +- src/H5Ppublic.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/H5P.c b/src/H5P.c index f075b92..254c3a9 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -665,10 +665,10 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5Pset(hid_t plist_id, const char *name, void *value) +H5Pset(hid_t plist_id, const char *name, const void *value) { H5P_genplist_t *plist; /* Property list to modify */ - herr_t ret_value=SUCCEED; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "i*s*x", plist_id, name, value); @@ -678,11 +678,11 @@ H5Pset(hid_t plist_id, const char *name, void *value) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if(!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name"); - if(value==NULL) + if(value == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalied property value"); /* Go set the value */ - if(H5P_set(plist,name,value) < 0) + if(H5P_set(plist, name, value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to set value in plist"); done: diff --git a/src/H5Pint.c b/src/H5Pint.c index 099d239..8e9a9bc 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -2997,7 +2997,7 @@ done: herr_t H5P_set(plist, name, value) H5P_genplist_t *plist; IN: Property list to find property in const char *name; IN: Name of property to set - void *value; IN: Pointer to the value for the property + const void *value; IN: Pointer to the value for the property RETURNS Returns non-negative on success, negative on failure. DESCRIPTION diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 5fdb8b8..67727ce 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -234,7 +234,7 @@ H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); -H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, void *value); +H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value); H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); H5_DLL herr_t H5Pencode(hid_t plist_id, void *buf, size_t *nalloc); H5_DLL hid_t H5Pdecode(const void *buf); -- cgit v0.12