summaryrefslogtreecommitdiffstats
path: root/tools
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
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')
-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
-rw-r--r--tools/src/h5dump/h5dump_defines.h4
-rw-r--r--tools/src/h5ls/h5ls.c4
-rw-r--r--tools/test/h5repack/h5repacktst.c4
7 files changed, 16 insertions, 16 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 */
diff --git a/tools/src/h5dump/h5dump_defines.h b/tools/src/h5dump/h5dump_defines.h
index bb4236d..5f89178 100644
--- a/tools/src/h5dump/h5dump_defines.h
+++ b/tools/src/h5dump/h5dump_defines.h
@@ -28,7 +28,7 @@
else { \
PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \
} \
- } while (0);
+ } while (0)
#define end_obj(obj, end) \
do { \
@@ -39,7 +39,7 @@
} \
if (HDstrlen(obj)) \
PRINTSTREAM(rawoutstream, "%s", obj); \
- } while (0);
+ } while (0)
/* 3 private values: can't be set, but can be read.
Note: these are defined in H5Zprivate, they are
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index b6ce9b1..84567c8 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -141,11 +141,11 @@ static struct dispatch_t {
} dispatch_g[H5O_TYPE_NTYPES];
#define DISPATCH(TYPE, NAME, LIST1, LIST2) \
- { \
+ do { \
dispatch_g[TYPE].name = (NAME); \
dispatch_g[TYPE].list1 = (LIST1); \
dispatch_g[TYPE].list2 = (LIST2); \
- }
+ } while (0)
static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
static hbool_t print_int_type(h5tools_str_t *buffer, hid_t type, int ind);
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index a9e8b40..00a7ae2 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -17,10 +17,10 @@
#include "h5tools_utils.h"
#define GOERROR \
- { \
+ do { \
H5_FAILED(); \
goto error; \
- }
+ } while (0)
/* fill value test */
#define FNAME0 "h5repack_fill.h5"