diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-11-13 04:36:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-13 04:36:32 (GMT) |
commit | d224f98dbc63104b523186c9b708c2a05f6e4374 (patch) | |
tree | b8396445648acd3c5f0cfe0dda215ce4cced0d2a /src/H5HFman.c | |
parent | 08b1c6ac3c7d65fe5bfc1d70b68f66d633fa5999 (diff) | |
download | hdf5-d224f98dbc63104b523186c9b708c2a05f6e4374.zip hdf5-d224f98dbc63104b523186c9b708c2a05f6e4374.tar.gz hdf5-d224f98dbc63104b523186c9b708c2a05f6e4374.tar.bz2 |
Quiets most const warnings in the fractal heap code (#1188)
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r-- | src/H5HFman.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c index 427be00..a362d99 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -487,10 +487,16 @@ H5HF__man_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) HDassert(id); HDassert(obj); - /* Call the internal 'op' routine routine */ - /* (Casting away const OK - QAK) */ + /* Call the internal 'op' routine routine + * + * In this case, the callback operation needs to modify the obj buffer that + * was passed in as const. We quiet the warning here because an obj pointer + * that was originally const should *never* arrive here. + */ + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5HF__man_op_real(hdr, id, H5HF__op_write, (void *)obj, H5HF_OP_MODIFY) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + H5_GCC_CLANG_DIAG_ON("cast-qual") done: FUNC_LEAVE_NOAPI(ret_value) |