summaryrefslogtreecommitdiffstats
path: root/src/H5HFcache.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-11-13 04:36:32 (GMT)
committerGitHub <noreply@github.com>2021-11-13 04:36:32 (GMT)
commitd224f98dbc63104b523186c9b708c2a05f6e4374 (patch)
treeb8396445648acd3c5f0cfe0dda215ce4cced0d2a /src/H5HFcache.c
parent08b1c6ac3c7d65fe5bfc1d70b68f66d633fa5999 (diff)
downloadhdf5-d224f98dbc63104b523186c9b708c2a05f6e4374.zip
hdf5-d224f98dbc63104b523186c9b708c2a05f6e4374.tar.gz
hdf5-d224f98dbc63104b523186c9b708c2a05f6e4374.tar.bz2
Quiets most const warnings in the fractal heap code (#1188)
Diffstat (limited to 'src/H5HFcache.c')
-rw-r--r--src/H5HFcache.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index fde5a4f..5b50725 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -1655,9 +1655,15 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
/* Update info about direct block */
udata->decompressed = TRUE;
len = nbytes;
- } /* end if */
- else
- read_buf = (void *)image; /* Casting away const OK - QAK */
+ }
+ else {
+ /* If the data are unfiltered, we just point to the image, which we
+ * never modify. Casting away const is okay here.
+ */
+ H5_GCC_CLANG_DIAG_OFF("cast-qual")
+ read_buf = (void *)image;
+ H5_GCC_CLANG_DIAG_OFF("cast-qual")
+ }
/* Decode checksum */
chk_size = (size_t)(H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr) - H5HF_SIZEOF_CHKSUM);