summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_array.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-06-16 04:49:02 (GMT)
committerGitHub <noreply@github.com>2023-06-16 04:49:02 (GMT)
commit68eba3da69e659fab69bbef5901ce42e82cea1dc (patch)
treef36805f798df6c04092c14dc6803d2cb82f6eff2 /tools/lib/h5diff_array.c
parent10093f7c4345061bdbebc12888debbf08fe85a5b (diff)
downloadhdf5-68eba3da69e659fab69bbef5901ce42e82cea1dc.zip
hdf5-68eba3da69e659fab69bbef5901ce42e82cea1dc.tar.gz
hdf5-68eba3da69e659fab69bbef5901ce42e82cea1dc.tar.bz2
Many clang -Wextra-semi-stmt fixes (#2537)
* Adds semicolons to function-like macros * Adds a do..while(0) loop to some macros * Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r--tools/lib/h5diff_array.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 3f504eb..825ca06 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -96,7 +96,7 @@ static hbool_t not_comparable;
}
#define PER_UNSIGN(TYPE, A, B) \
- { \
+ do { \
per = -1; \
not_comparable = FALSE; \
both_zero = FALSE; \
@@ -106,7 +106,7 @@ static hbool_t not_comparable;
per = ABS((double)((TYPE)((B) - (A))) / (double)(A)); \
else \
not_comparable = TRUE; \
- }
+ } while (0)
#define PDIFF(a, b) (((b) > (a)) ? ((b) - (a)) : ((a) - (b)))
@@ -684,7 +684,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
}
/* enable error reporting */
}
- H5E_END_TRY;
+ H5E_END_TRY
}
break;
@@ -1371,7 +1371,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di
npoints1 = H5Sget_select_elem_npoints(region1_id);
npoints2 = H5Sget_select_elem_npoints(region2_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
H5TOOLS_DEBUG("blocks: 1=%" PRIdHSIZE "-2=%" PRIdHSIZE, nblocks1, nblocks2);
H5TOOLS_DEBUG("points: 1=%" PRIdHSIZE "-2=%" PRIdHSIZE, npoints1, npoints2);
@@ -3117,7 +3117,7 @@ done:
{
H5Pclose(dxpl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (buf)
HDfree(buf);