summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 0b822a7..433472b 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1378,10 +1378,15 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap);
* that will always generate the expected name.
*/
#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \
- ASSIGN_##srctype##_TO_##dsttype(dst, dsttype, src, srctype)
+ do { \
+ ASSIGN_##srctype##_TO_##dsttype(dst, dsttype, src, srctype) \
+ } while (0)
#else /* NDEBUG */
-#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) (dst) = (dsttype)(src);
+#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \
+ do { \
+ (dst) = (dsttype)(src); \
+ } while (0)
#endif /* NDEBUG */
#if defined(H5_HAVE_WINDOW_PATH)