diff options
author | Sean McBride <sean@rogue-research.com> | 2023-06-16 04:49:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 04:49:02 (GMT) |
commit | 68eba3da69e659fab69bbef5901ce42e82cea1dc (patch) | |
tree | f36805f798df6c04092c14dc6803d2cb82f6eff2 /test/ros3.c | |
parent | 10093f7c4345061bdbebc12888debbf08fe85a5b (diff) | |
download | hdf5-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 'test/ros3.c')
-rw-r--r-- | test/ros3.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/ros3.c b/test/ros3.c index bc9eb86..7eb4230 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -588,7 +588,7 @@ test_fapl_config_validation(void) */ success = H5Pset_fapl_ros3(fapl_id, &case_ptr->config); } - H5E_END_TRY; + H5E_END_TRY JSVERIFY(case_ptr->expected, success, case_ptr->msg) @@ -629,7 +629,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; } /* test_fapl_config_validation */ @@ -706,7 +706,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY return 1; @@ -877,7 +877,7 @@ test_vfd_open(void) { fd = H5FDopen(T.url, T.flags, _fapl_id, T.maxaddr); } - H5E_END_TRY; + H5E_END_TRY if (NULL != fd) JSVERIFY(1, 0, T.message); /* wrapper to print message and fail */ } @@ -921,14 +921,14 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } if (fapl_file_access >= 0) { H5E_BEGIN_TRY { (void)H5Pclose(fapl_file_access); } - H5E_END_TRY; + H5E_END_TRY } if (curl_ready == TRUE) { curl_global_cleanup(); @@ -1062,7 +1062,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1131,7 +1131,7 @@ test_H5FDread_without_eoa_set_fails(void) H5E_BEGIN_TRY{/* mute stack trace on expected failure */ JSVERIFY(FAIL, H5FDread(file_shakespeare, H5FD_MEM_DRAW, H5P_DEFAULT, 1200699, 102, buffer), - "cannot read before eoa is set")} H5E_END_TRY; + "cannot read before eoa is set")} H5E_END_TRY JSVERIFY_STR("", buffer, "buffer should remain untouched") /************ @@ -1160,7 +1160,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1330,7 +1330,7 @@ test_read(void) { open_return = H5FDread(file_raven, H5FD_MEM_DRAW, H5P_DEFAULT, test.addr, test.len, buffer); } - H5E_END_TRY; + H5E_END_TRY JSVERIFY(test.success, open_return, test.message) if (open_return == SUCCEED) @@ -1363,7 +1363,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1443,12 +1443,12 @@ test_noops_and_autofails(void) /* auto-fail calls to write and truncate */ H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data), - "write must fail")} H5E_END_TRY; + "write must fail")} H5E_END_TRY - H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY; + H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY H5E_BEGIN_TRY{ - JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY; + JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY /************ * TEARDOWN * @@ -1476,7 +1476,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } if (file) { (void)H5FDclose(file); @@ -1610,7 +1610,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1683,11 +1683,11 @@ test_H5F_integration(void) /* Read-Write Open access is not allowed with this file driver. */ - H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fopen(url_h5_public, H5F_ACC_RDWR, fapl_id))} H5E_END_TRY; + H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fopen(url_h5_public, H5F_ACC_RDWR, fapl_id))} H5E_END_TRY /* H5Fcreate() is not allowed with this file driver. */ - H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fcreate(url_missing, H5F_ACC_RDONLY, H5P_DEFAULT, fapl_id))} H5E_END_TRY; + H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fcreate(url_missing, H5F_ACC_RDONLY, H5P_DEFAULT, fapl_id))} H5E_END_TRY /* Successful open. */ @@ -1719,7 +1719,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } if (file > 0) (void)H5Fclose(file); |