summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-13 19:20:19 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-13 19:20:19 (GMT)
commit9712fad601a7844dc01deb1dc4d81b5aa5402b5e (patch)
treea5020737164f843254a67695e4cae4586f568c3e /src/H5private.h
parentb0e5b2d9338bf352a4154a838c4146c84be8705b (diff)
downloadhdf5-9712fad601a7844dc01deb1dc4d81b5aa5402b5e.zip
hdf5-9712fad601a7844dc01deb1dc4d81b5aa5402b5e.tar.gz
hdf5-9712fad601a7844dc01deb1dc4d81b5aa5402b5e.tar.bz2
fix unused related warnings
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h
index c39c946..a6f0474 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -306,6 +306,7 @@
#ifdef __cplusplus
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_SANITY_CHECK /*void*/
# define H5_ATTR_NORETURN /*void*/
# define H5_ATTR_CONST /*void*/
# define H5_ATTR_PURE /*void*/
@@ -314,6 +315,11 @@
#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z)))
# define H5_ATTR_UNUSED __attribute__((unused))
+#ifndef NDEBUG
+#define H5_ATTR_SANITY_CHECK /*void*/
+#else /* NDEBUG */
+#define H5_ATTR_SANITY_CHECK H5_ATTR_UNUSED
+#endif /* NDEBUG */
# define H5_ATTR_NORETURN __attribute__((noreturn))
# define H5_ATTR_CONST __attribute__((const))
# define H5_ATTR_PURE __attribute__((pure))
@@ -325,6 +331,7 @@
#else
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
# define H5_ATTR_UNUSED /*void*/
+# define H5_ATTR_SANITY_CHECK /*void*/
# define H5_ATTR_NORETURN /*void*/
# define H5_ATTR_CONST /*void*/
# define H5_ATTR_PURE /*void*/
@@ -2047,7 +2054,7 @@ H5_DLL herr_t H5CX_pop(void);
#define FUNC_ENTER_COMMON(asrt) \
- hbool_t err_occurred = FALSE; \
+ hbool_t H5_ATTR_SANITY_CHECK err_occurred = FALSE; \
\
FUNC_ENTER_CHECK_NAME(asrt);