summaryrefslogtreecommitdiffstats
path: root/src/H5RS.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-12-08 17:40:30 (GMT)
committerGitHub <noreply@github.com>2021-12-08 17:40:30 (GMT)
commit0247538fc5226b0899f00c45adab2a454627de02 (patch)
tree2e56201d9a70296920e96e9ba2edb09353ce2d5f /src/H5RS.c
parent1ca806a04eb28c1b1307fcc804a45e4722ff8563 (diff)
downloadhdf5-0247538fc5226b0899f00c45adab2a454627de02.zip
hdf5-0247538fc5226b0899f00c45adab2a454627de02.tar.gz
hdf5-0247538fc5226b0899f00c45adab2a454627de02.tar.bz2
VFD SWMR: Normalization with develop (#1270)
Brings many October-November changes from develop
Diffstat (limited to 'src/H5RS.c')
-rw-r--r--src/H5RS.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/H5RS.c b/src/H5RS.c
index d9915f2..65cfd38 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -316,8 +316,16 @@ H5RS_wrap(const char *s)
if (NULL == (ret_value = H5FL_MALLOC(H5RS_str_t)))
HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, NULL, "memory allocation failed")
- /* Set the internal fields */
- ret_value->s = (char *)s;
+ /* Set the internal fields
+ *
+ * We ignore warnings about storing a const char pointer in the struct
+ * since we never modify or free the string when the wrapped struct
+ * field is set to TRUE.
+ */
+ H5_GCC_CLANG_DIAG_OFF("cast-qual")
+ ret_value->s = (char *)s;
+ H5_GCC_CLANG_DIAG_ON("cast-qual")
+
ret_value->len = HDstrlen(s);
ret_value->end = ret_value->s + ret_value->len;