diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-03-20 15:03:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 15:03:46 (GMT) |
commit | bdde027f6dc298cfd95053c562544a62dcfbd787 (patch) | |
tree | 84ca881c7184c5a419d06e483ad0f76bebcf1bec /src/H5Ocache.c | |
parent | ae5702bf6c6bf8b7979561dc5112284dbb5b7cf8 (diff) | |
download | hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.zip hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.tar.gz hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.tar.bz2 |
Bring warning fixes from develop (#2608)
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r-- | src/H5Ocache.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c index fd6552b..b32b82f 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -1429,11 +1429,13 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t oh->nmesgs++; /* Initialize information about message */ - mesg->dirty = FALSE; - mesg->flags = flags; - mesg->crt_idx = crt_idx; - mesg->native = NULL; - mesg->raw = (uint8_t *)chunk_image; /* Casting away const OK - QAK */ + mesg->dirty = FALSE; + mesg->flags = flags; + mesg->crt_idx = crt_idx; + mesg->native = NULL; + H5_GCC_CLANG_DIAG_OFF("cast-qual") + mesg->raw = (uint8_t *)chunk_image; + H5_GCC_CLANG_DIAG_ON("cast-qual") mesg->raw_size = mesg_size; mesg->chunkno = chunkno; @@ -1636,10 +1638,12 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno) /* Encode any dirty messages in this chunk */ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) - if (curr_msg->dirty && curr_msg->chunkno == chunkno) - /* Casting away const OK -QAK */ + if (curr_msg->dirty && curr_msg->chunkno == chunkno) { + H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5O_msg_flush((H5F_t *)f, oh, curr_msg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message") + H5_GCC_CLANG_DIAG_ON("cast-qual") + } /* Sanity checks */ if (oh->version > H5O_VERSION_1) |