summaryrefslogtreecommitdiffstats
path: root/src/H5Pdxpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Pdxpl.c')
-rw-r--r--src/H5Pdxpl.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 46dc94c..42dd6e4 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -2213,10 +2213,18 @@ H5P__dxfr_dset_io_hyp_sel_cmp(const void *_space1, const void *_space2, size_t H
if (TRUE != H5S_extent_equal(*space1, *space2))
HGOTO_DONE(-1);
- /* Compare the selection "shape" of the dataspaces */
- /* (Error & not-equal count the same) */
- if (TRUE != H5S_select_shape_same(*space1, *space2))
+ /* Compare the selection "shape" of the dataspaces
+ * (Error & not-equal count the same)
+ *
+ * Since H5S_select_shape_same() can result in the dataspaces being
+ * rebuilt, the parameters are not const which makes it impossible
+ * to match the cmp prototype. Since we need to compare them,
+ * we quiet the const warning.
+ */
+ H5_GCC_CLANG_DIAG_OFF("cast-qual")
+ if (TRUE != H5S_select_shape_same((H5S_t *)*space1, (H5S_t *)*space2))
HGOTO_DONE(-1);
+ H5_GCC_CLANG_DIAG_ON("cast-qual")
} /* end if */
done: