summaryrefslogtreecommitdiffstats
path: root/test/tattr.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-08-02 22:46:26 (GMT)
committerGitHub <noreply@github.com>2023-08-02 22:46:26 (GMT)
commit07df0d252cc72fde5ead0abad12e23c8b522c2ee (patch)
tree4e2bea9eb00f7f97fa8d22bac6c38f37a9576b26 /test/tattr.c
parent86ddedf522aa8a72cfe03b9275ae16800d1fb5b9 (diff)
downloadhdf5-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 'test/tattr.c')
-rw-r--r--test/tattr.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/test/tattr.c b/test/tattr.c
index 45f9865..91cba51 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -252,7 +252,7 @@ test_attr_basic_write(hid_t fapl)
{
ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -397,7 +397,7 @@ test_attr_basic_write(hid_t fapl)
{
ret_id = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -770,7 +770,7 @@ test_attr_compound_write(hid_t fapl)
{
ret_id = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write complex attribute data */
@@ -995,7 +995,7 @@ test_attr_scalar_write(hid_t fapl)
{
ret_id = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write attribute information */
@@ -1142,7 +1142,7 @@ test_attr_mult_write(hid_t fapl)
{
ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write 1st attribute data */
@@ -1170,7 +1170,7 @@ test_attr_mult_write(hid_t fapl)
{
ret_id = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write 2nd attribute information */
@@ -1198,7 +1198,7 @@ test_attr_mult_write(hid_t fapl)
{
ret_id = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write 3rd attribute information */
@@ -1596,7 +1596,7 @@ test_attr_delete(hid_t fapl)
{
ret = H5Adelete(dataset, "Bogus");
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Adelete");
/* Verify the correct number of attributes */
@@ -2291,7 +2291,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
{
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(attr, FAIL, "H5Acreate2");
/* Close dataspace */
@@ -4241,7 +4241,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
{
ret = H5Aget_num_attrs((hid_t)-1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_num_attrs");
/* Get number of attributes */
@@ -4453,7 +4453,7 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
{
ret = H5Pset_attr_creation_order(dcpl, H5P_CRT_ORDER_INDEXED);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_attr_creation_order");
ret = H5Pget_attr_creation_order(dcpl, &crt_order_flags);
CHECK(ret, FAIL, "H5Pget_attr_creation_order");
@@ -5905,14 +5905,14 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, &ainfo,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_info_by_idx");
H5E_BEGIN_TRY
{
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_name_by_idx");
/* Create attributes, up to limit of compact form */
@@ -5950,21 +5950,21 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, &ainfo,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_info_by_idx");
H5E_BEGIN_TRY
{
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)u, &ainfo,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_info_by_idx");
H5E_BEGIN_TRY
{
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_name_by_idx");
/* Create more attributes, to push into dense form */
@@ -6015,21 +6015,21 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, &ainfo,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_info_by_idx");
H5E_BEGIN_TRY
{
ret = H5Aget_info_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)u, &ainfo,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_info_by_idx");
H5E_BEGIN_TRY
{
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u,
tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aget_name_by_idx");
} /* end for */
@@ -6426,7 +6426,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Adelete_by_idx");
/* Create attributes, up to limit of compact form */
@@ -6464,7 +6464,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Adelete_by_idx");
} /* end for */
@@ -6596,7 +6596,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Adelete_by_idx");
} /* end for */
@@ -6664,7 +6664,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Adelete_by_idx");
} /* end for */
@@ -6835,7 +6835,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Adelete_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Adelete_by_idx");
} /* end for */
@@ -7228,7 +7228,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
{
ret = H5Aiterate2(obj_id, idx_type, order, &skip, attr_iterate2_fail_cb, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate2");
skip = 0;
@@ -7237,7 +7237,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &skip, attr_iterate2_fail_cb, NULL,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate_by_name");
skip = 0;
@@ -7246,7 +7246,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
ret =
H5Aiterate_by_name(obj_id, ".", idx_type, order, &skip, attr_iterate2_fail_cb, NULL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate_by_name");
/* Retrieve current # of errors */
@@ -7453,7 +7453,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Aiterate2(my_dataset, idx_type, order, &idx, attr_iterate2_cb, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate2");
idx = u;
@@ -7462,7 +7462,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &idx, attr_iterate2_cb, NULL,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate_by_name");
idx = u;
@@ -7471,7 +7471,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aiterate_by_name(my_dataset, ".", idx_type, order, &idx, attr_iterate2_cb,
NULL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate_by_name");
/* Test iteration over attributes stored compactly */
@@ -7552,7 +7552,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret = H5Aiterate2(my_dataset, idx_type, order, &idx, attr_iterate2_cb, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate2");
idx = u;
@@ -7561,7 +7561,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aiterate_by_name(fid, dsetname, idx_type, order, &idx, attr_iterate2_cb, NULL,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate_by_name");
idx = u;
@@ -7570,7 +7570,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret = H5Aiterate_by_name(my_dataset, ".", idx_type, order, &idx, attr_iterate2_cb,
NULL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate_by_name");
/* Test iteration over attributes stored densely */
@@ -7803,7 +7803,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_idx");
/* Create attributes, up to limit of compact form */
@@ -7842,7 +7842,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_idx");
/* Test opening attributes by index stored compactly */
@@ -7920,7 +7920,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT,
H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_idx");
/* Test opening attributes by index stored compactly */
@@ -8139,21 +8139,21 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen");
H5E_BEGIN_TRY
{
ret_id = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_name");
H5E_BEGIN_TRY
{
ret_id = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_name");
/* Create attributes, up to limit of compact form */
@@ -8190,21 +8190,21 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen");
H5E_BEGIN_TRY
{
ret_id = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_name");
H5E_BEGIN_TRY
{
ret_id = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_name");
/* Test opening attributes stored compactly */
@@ -8283,21 +8283,21 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen");
H5E_BEGIN_TRY
{
ret_id = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_name");
H5E_BEGIN_TRY
{
ret_id = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Aopen_by_name");
/* Test opening attributes stored compactly */
@@ -11647,5 +11647,5 @@ cleanup_attr(void)
{
H5Fdelete(FILENAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
}