summaryrefslogtreecommitdiffstats
path: root/src/H5HLcache.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-27 00:42:40 (GMT)
committerGitHub <noreply@github.com>2022-07-27 00:42:40 (GMT)
commit21aca4f380ac47b0c19d1926b13eaab0750406d0 (patch)
tree9e0379550949b1679b3329813385aaa46610a3f3 /src/H5HLcache.c
parentae414872f50187e64cbd6cc8f076c22cf5df2d53 (diff)
downloadhdf5-21aca4f380ac47b0c19d1926b13eaab0750406d0.zip
hdf5-21aca4f380ac47b0c19d1926b13eaab0750406d0.tar.gz
hdf5-21aca4f380ac47b0c19d1926b13eaab0750406d0.tar.bz2
Misc clang production warning fixes (#1932)
* Misc clang production warning fixes * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5HLcache.c')
-rw-r--r--src/H5HLcache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 4d78d0c..620704a 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -541,7 +541,6 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */
H5HL_t *heap; /* Pointer to the local heap */
uint8_t *image = (uint8_t *)_image; /* Pointer into image buffer */
- size_t buf_size; /* expected size of the image buffer */
FUNC_ENTER_PACKAGE_NOERR
@@ -558,11 +557,13 @@ H5HL__cache_prefix_serialize(const H5_ATTR_NDEBUG_UNUSED H5F_t *f, void *_image,
heap = prfx->heap;
HDassert(heap);
+#ifndef NDEBUG
/* Compute the buffer size */
- buf_size = heap->prfx_size;
+ size_t buf_size = heap->prfx_size; /* expected size of the image buffer */
if (heap->single_cache_obj)
buf_size += heap->dblk_size;
HDassert(len == buf_size);
+#endif
/* Update the free block value from the free list */
heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;