From 14de476c8cb1b797ad43bea3c71dfb32bcd2131c Mon Sep 17 00:00:00 2001 From: Songyu Lu Date: Tue, 27 Nov 2018 09:04:42 -0600 Subject: HDFFV-10607 Fixing two compiler warnings in the library. --- src/H5Ocache.c | 2 +- src/H5RS.c | 4 ++-- src/H5RSprivate.h | 2 +- 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); -- cgit v0.12