diff options
author | Sean McBride <sean@rogue-research.com> | 2023-08-02 22:46:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 22:46:26 (GMT) |
commit | 07df0d252cc72fde5ead0abad12e23c8b522c2ee (patch) | |
tree | 4e2bea9eb00f7f97fa8d22bac6c38f37a9576b26 /tools/src/h5perf | |
parent | 86ddedf522aa8a72cfe03b9275ae16800d1fb5b9 (diff) | |
download | hdf5-07df0d252cc72fde5ead0abad12e23c8b522c2ee.zip hdf5-07df0d252cc72fde5ead0abad12e23c8b522c2ee.tar.gz hdf5-07df0d252cc72fde5ead0abad12e23c8b522c2ee.tar.bz2 |
Fixes the last of the -Wextra-semi-stmt warnings (#3326)
* Fixed extra semi warning by adjusting alternative macro definitions
* Find-replace H5E_END_TRY; -> H5E_END_TRY
* Made H5Epush_goto a do-while loop, fixed indentation
* Made GOTOERROR and ERRMSG do-while loops
* Made Hgoto_error and Hgoto_done do-while loops
* Made vrfy_cint_type and vrfy_ctype do-while loops
* Made TEST_TYPE_CONTIG and others do-while loops
* Removed extraneous semi-colons
* Committing clang-format changes
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/src/h5perf')
-rw-r--r-- | tools/src/h5perf/pio_engine.c | 8 | ||||
-rw-r--r-- | tools/src/h5perf/sio_engine.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index 9b2c1c2..8830c82 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -52,15 +52,15 @@ #define ELMT_H5_TYPE H5T_NATIVE_UCHAR #define GOTOERROR(errcode) \ - { \ + do { \ ret_code = errcode; \ goto done; \ - } + } while (0) #define ERRMSG(mesg) \ - { \ + do { \ fprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \ fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \ - } + } while (0) /* verify: if val is false (0), print mesg. */ #define VRFY(val, mesg) \ diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index 849238f..1f73a62 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -34,14 +34,14 @@ #define ELMT_H5_TYPE H5T_NATIVE_UCHAR #define GOTOERROR(errcode) \ - { \ + do { \ ret_code = errcode; \ goto done; \ - } + } while (0) #define ERRMSG(mesg) \ - { \ + do { \ fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \ - } + } while (0) /* verify: if val is false (0), print mesg. */ #define VRFY(val, mesg) \ |