summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2021-11-08 20:33:39 (GMT)
committerGitHub <noreply@github.com>2021-11-08 20:33:39 (GMT)
commite82d39ca0e4122facb87fe784e58a77f41a8814f (patch)
treeadd070cb83465d3cffe9aebf384f188b09a0fb67 /src
parent6b737bf4cf6637439d2d6f3320be548c4e047b08 (diff)
downloadhdf5-e82d39ca0e4122facb87fe784e58a77f41a8814f.zip
hdf5-e82d39ca0e4122facb87fe784e58a77f41a8814f.tar.gz
hdf5-e82d39ca0e4122facb87fe784e58a77f41a8814f.tar.bz2
Fix the function cast error in H5Dchunk.c and activate (#1170)
`-Werror=cast-function-type`. Again.
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 6600417..9a9121a 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -1401,6 +1401,19 @@ H5D__chunk_mem_xfree(void *chk, const void *_pline)
} /* H5D__chunk_mem_xfree() */
/*-------------------------------------------------------------------------
+ * Function: H5D__chunk_mem_free
+ *
+ * Purpose: Wrapper with H5MM_free_t-compatible signature that just
+ * calls H5D__chunk_mem_xfree and discards the return value.
+ *-------------------------------------------------------------------------
+ */
+static void
+H5D__chunk_mem_free(void *chk, const void *_pline)
+{
+ (void)H5D__chunk_mem_xfree(chk, _pline);
+}
+
+/*-------------------------------------------------------------------------
* Function: H5D__chunk_mem_realloc
*
* Purpose: Reallocate space for a chunk in memory. This routine allocates
@@ -4387,7 +4400,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, const
/* (delay allocating fill buffer for VL datatypes until refilling) */
/* (casting away const OK - QAK) */
if (H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc, (void *)pline,
- (H5MM_free_t)H5D__chunk_mem_xfree, (void *)pline, &dset->shared->dcpl_cache.fill,
+ (H5MM_free_t)H5D__chunk_mem_free, (void *)pline, &dset->shared->dcpl_cache.fill,
dset->shared->type, dset->shared->type_id, (size_t)0, orig_chunk_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;