summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-07-24 21:18:04 (GMT)
committerGitHub <noreply@github.com>2023-07-24 21:18:04 (GMT)
commit553e1cd31150f7ca58f87f40d63dd8f200721611 (patch)
tree12b0aa9c90279d015bf6596e2b60d443d384c0c1 /tools/lib
parente0083c48e90beb5b56bf93eccdbfa89baa79750a (diff)
downloadhdf5-553e1cd31150f7ca58f87f40d63dd8f200721611.zip
hdf5-553e1cd31150f7ca58f87f40d63dd8f200721611.tar.gz
hdf5-553e1cd31150f7ca58f87f40d63dd8f200721611.tar.bz2
Another round of fixing -Wextra-semi-stmt warnings (#3264)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5tools.c4
-rw-r--r--tools/lib/h5tools_dump.c6
-rw-r--r--tools/lib/h5tools_error.h6
4 files changed, 10 insertions, 10 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index edb0190..abb81b9 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -83,7 +83,7 @@
static hbool_t not_comparable;
#define PER(A, B) \
- { \
+ do { \
per = -1; \
not_comparable = FALSE; \
both_zero = FALSE; \
@@ -93,7 +93,7 @@ static hbool_t not_comparable;
per = (double)ABS((double)((B) - (A)) / (double)(A)); \
else \
not_comparable = TRUE; \
- }
+ } while (0)
#define PER_UNSIGN(TYPE, A, B) \
do { \
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 76f3839..0e063c7 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -2168,7 +2168,7 @@ done:
if (dtype > 0 && H5Tclose(dtype) < 0)
H5TOOLS_ERROR(FALSE, "H5Tclose failed");
- H5_LEAVE(TRUE)
+ H5_LEAVE(TRUE);
CATCH
H5TOOLS_ENDDEBUG(" ");
@@ -2283,7 +2283,7 @@ done:
if (dtype > 0 && H5Tclose(dtype) < 0)
H5TOOLS_ERROR(FALSE, "H5Tclose failed");
- H5_LEAVE(ret_value)
+ H5_LEAVE(ret_value);
CATCH
H5TOOLS_ENDDEBUG(" ");
return ret_value;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index d869907..6028f92 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -441,7 +441,7 @@ done:
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */
- H5_LEAVE(dimension_break)
+ H5_LEAVE(dimension_break);
CATCH
@@ -843,7 +843,7 @@ done:
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */
- H5_LEAVE(dimension_break)
+ H5_LEAVE(dimension_break);
CATCH
@@ -1198,7 +1198,7 @@ done:
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region } element end */
- H5_LEAVE(dimension_break)
+ H5_LEAVE(dimension_break);
CATCH
H5TOOLS_ENDDEBUG(" ");
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index 4d0bef2..8a7414c 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -222,11 +222,11 @@ catch_except:;
* it.
*/
#define H5_LEAVE(v) \
- { \
+ do { \
ret_value = v; \
if (!past_catch) \
goto catch_except; \
- }
+ } while (0)
/*
* H5TOOLS_THROW macro, used to facilitate error reporting within a function body.
@@ -238,7 +238,7 @@ catch_except:;
do { \
H5TOOLS_PUSH_ERROR(H5tools_ERR_STACK_g, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g, \
__VA_ARGS__); \
- H5_LEAVE(ret_val) \
+ H5_LEAVE(ret_val); \
} while (0)
#endif /* H5TOOLS_ERROR_H */