summaryrefslogtreecommitdiffstats
path: root/src/H5FDsubfiling/H5FDioc.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-10-16 12:52:23 (GMT)
committerGitHub <noreply@github.com>2023-10-16 12:52:23 (GMT)
commit516167d31bd49ca3f291a66f01c132f5d427aae7 (patch)
treec9e2ee9ad4732212913f19745f3d1df8f41e47d7 /src/H5FDsubfiling/H5FDioc.c
parent882bcd01b9c7caaa0ef2fe27e67bddc340f8855e (diff)
downloadhdf5-516167d31bd49ca3f291a66f01c132f5d427aae7.zip
hdf5-516167d31bd49ca3f291a66f01c132f5d427aae7.tar.gz
hdf5-516167d31bd49ca3f291a66f01c132f5d427aae7.tar.bz2
Remove CANBE_UNUSED() from subfiling VFD (#3678)
This macro was an attempt to quiet warnings about release mode unused variables that only appear in asserts. It resolves to a void cast, which doesn't quiet warnings when an assignment has already taken place.
Diffstat (limited to 'src/H5FDsubfiling/H5FDioc.c')
-rw-r--r--src/H5FDsubfiling/H5FDioc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index 39766de..80771c0 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -32,8 +32,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
-#define CANBE_UNUSED(X) (void)(X)
-
/* The driver identification number, initialized at runtime */
static hid_t H5FD_IOC_g = H5I_INVALID_HID;
@@ -1219,13 +1217,14 @@ static herr_t
H5FD__ioc_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, void *buf)
{
- H5FD_ioc_t *file = (H5FD_ioc_t *)_file;
- herr_t ret_value = SUCCEED;
+#ifndef NDEBUG
+ H5FD_ioc_t *file = (H5FD_ioc_t *)_file;
+#endif
+ herr_t ret_value = SUCCEED;
H5FD_IOC_LOG_CALL(__func__);
assert(file && file->pub.cls);
- CANBE_UNUSED(file);
assert(buf);
/* Check for overflow conditions */