summaryrefslogtreecommitdiffstats
path: root/src/H5Epublic.h
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-03-04 16:04:41 (GMT)
committerGitHub <noreply@github.com>2021-03-04 16:04:41 (GMT)
commitfb210fc4fd70ce68b95a08f91eee2580552b6d21 (patch)
tree479fc17cdeef90c415fb446236014421f871de2c /src/H5Epublic.h
parentfab95ce7b309e3cb43cc9dc25c08da986f5d0e58 (diff)
downloadhdf5-fb210fc4fd70ce68b95a08f91eee2580552b6d21.zip
hdf5-fb210fc4fd70ce68b95a08f91eee2580552b6d21.tar.gz
hdf5-fb210fc4fd70ce68b95a08f91eee2580552b6d21.tar.bz2
Use do-while trick to force H5Epush_ret() to require trailing semi (#380)
* Use do-while trick to force H5Epush_ret() to require trailing semi Fixed ensuing compiler errors. * Commit format changes from running clang-format with clang version 10.0.1. * Use do-while trick to force H5Epush_ret() to require trailing semi Fixed ensuing compiler errors. Updated RELEASE.txt. This change was made to allow clang-format to correctly format the code. Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'src/H5Epublic.h')
-rw-r--r--src/H5Epublic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index cf3167f..a2554d5 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -124,10 +124,10 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g;
/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */
/* And return after pushing error onto stack */
#define H5Epush_ret(func, cls, maj, min, str, ret) \
- { \
+ do { \
H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \
return (ret); \
- }
+ } while (0)
/* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in
* And goto a label after pushing error onto stack.