summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Lu <songyulu@hdfgroup.org>2018-11-27 20:59:43 (GMT)
committerRay Lu <songyulu@hdfgroup.org>2018-11-27 20:59:43 (GMT)
commit041a8295ff54ba42765b20eda6a5369bc31456d2 (patch)
treea7b954283525f83f448de9cabecec4e10a5ed5a4
parent3db8d69424fce2abb1a3bd7b4662700d58c2fec0 (diff)
parent14de476c8cb1b797ad43bea3c71dfb32bcd2131c (diff)
downloadhdf5-041a8295ff54ba42765b20eda6a5369bc31456d2.zip
hdf5-041a8295ff54ba42765b20eda6a5369bc31456d2.tar.gz
hdf5-041a8295ff54ba42765b20eda6a5369bc31456d2.tar.bz2
Merge pull request #1344 in HDFFV/hdf5 from ~SONGYULU/hdf5_ray:bugfix/HDFFV-10607-patches-for-warnings-in-the-core to develop
* commit '14de476c8cb1b797ad43bea3c71dfb32bcd2131c': HDFFV-10607 Fixing two compiler warnings in the library.
-rw-r--r--src/H5Ocache.c2
-rw-r--r--src/H5RS.c4
-rw-r--r--src/H5RSprivate.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index e7cad83..fba4f6e 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -1619,7 +1619,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image
done:
if(ret_value < 0 && udata->cont_msg_info->msgs) {
- udata->cont_msg_info->msgs = (H5O_chunk_t *)H5FL_SEQ_FREE(H5O_cont_t, udata->cont_msg_info->msgs);
+ udata->cont_msg_info->msgs = H5FL_SEQ_FREE(H5O_cont_t, udata->cont_msg_info->msgs);
udata->cont_msg_info->alloc_nmsgs = 0;
}
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5RS.c b/src/H5RS.c
index 0a3fff0..ae500c5 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -137,7 +137,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5RS_str_t *
-H5RS_wrap(char *s)
+H5RS_wrap(const char *s)
{
H5RS_str_t *ret_value; /* Return value */
@@ -148,7 +148,7 @@ H5RS_wrap(char *s)
HGOTO_ERROR(H5E_RS, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set the internal fields */
- ret_value->s = s;
+ ret_value->s = (char *)s;
ret_value->wrapped = 1;
ret_value->n = 1;
diff --git a/src/H5RSprivate.h b/src/H5RSprivate.h
index f69624a..1d26a18 100644
--- a/src/H5RSprivate.h
+++ b/src/H5RSprivate.h
@@ -44,7 +44,7 @@ typedef struct H5RS_str_t H5RS_str_t;
/* Private routines */
/********************/
H5_DLL H5RS_str_t *H5RS_create(const char *s);
-H5_DLL H5RS_str_t *H5RS_wrap(char *s);
+H5_DLL H5RS_str_t *H5RS_wrap(const char *s);
H5_DLL H5RS_str_t *H5RS_own(char *s);
H5_DLL herr_t H5RS_decr(H5RS_str_t *rs);
H5_DLL herr_t H5RS_incr(H5RS_str_t *rs);