From 803dffcaaedf9274d4839d7ebe1f463fabe95a78 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:19:12 +0000 Subject: [PATCH] Committing clang-format changes --- src/H5Oint.c | 6 +++--- test/th5o.c | 51 ++++++++++++++++++++++++++------------------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/H5Oint.c b/src/H5Oint.c index 1f3320b74a3..875e2caec65 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -2625,7 +2625,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or H5O_info2_t oinfo; /* Object info struct */ H5O_info2_t int_oinfo; /* Internal object info */ H5O_info2_t *oinfop = &oinfo; /* Object info pointer */ - void *obj = NULL; /* Object */ + void *obj = NULL; /* Object */ H5I_type_t opened_type; /* ID type of object */ hid_t obj_id = H5I_INVALID_HID; /* ID of object */ herr_t ret_value = FAIL; /* Return value */ @@ -2670,8 +2670,8 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register visited object"); /* Make callback for starting object */ - /* if ((ret_value = op(obj_id, ".", oinfop, op_data)) < 0) - */ + /* if ((ret_value = op(obj_id, ".", oinfop, op_data)) < 0) + */ if ((ret_value = op(obj_id, ".", oinfop, op_data)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects"); diff --git a/test/th5o.c b/test/th5o.c index 30eda54598c..c0675c82f0d 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -1880,13 +1880,13 @@ test_h5o_getinfo_visit(void) } /* test_h5o_getinfo_visit() */ -#define G1 "g1" /* Group /g1 */ -#define G1G2 "g1/g2" /* Group /g1/g2 */ -#define D1G1G2 "/g1/g2/dset1" /* Dataset /g1/g2/dset1 */ -#define NUM_OBJS 4 /* Number of objects including root group */ +#define G1 "g1" /* Group /g1 */ +#define G1G2 "g1/g2" /* Group /g1/g2 */ +#define D1G1G2 "/g1/g2/dset1" /* Dataset /g1/g2/dset1 */ +#define NUM_OBJS 4 /* Number of objects including root group */ typedef struct { - unsigned idx; /* Index in object visit structure */ + unsigned idx; /* Index in object visit structure */ } ovisit2_ud_t; /* Names of objects being visited, in this order */ @@ -1902,7 +1902,9 @@ static const char *visited_objs[] = {".", "g1", "g1/g2", "g1/g2/dset1"}; ** ****************************************************************/ static int -visit2_obj_cb(hid_t H5_ATTR_UNUSED obj_id, const char* name, const H5O_info1_t H5_ATTR_UNUSED *info, void* _op_data) { +visit2_obj_cb(hid_t H5_ATTR_UNUSED obj_id, const char *name, const H5O_info1_t H5_ATTR_UNUSED *info, + void *_op_data) +{ ovisit2_ud_t *op_data = (ovisit2_ud_t *)_op_data; @@ -1925,17 +1927,16 @@ visit2_obj_cb(hid_t H5_ATTR_UNUSED obj_id, const char* name, const H5O_info1_t H static void test_h5o_visit2(void) { - hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */ - hid_t gid1 = H5I_INVALID_HID, - gid2 = H5I_INVALID_HID; /* Group IDs */ - hid_t sid = H5I_INVALID_HID; /* Dataspace ID */ - hid_t did = H5I_INVALID_HID; /* Dataset ID */ - hid_t obj_id; /* Object ID for root group */ - char filename[1024]; /* File used in this test */ - ovisit2_ud_t udata; /* User-data for visiting */ - unsigned fields; /* Fields to return */ + hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */ + hid_t gid1 = H5I_INVALID_HID, gid2 = H5I_INVALID_HID; /* Group IDs */ + hid_t sid = H5I_INVALID_HID; /* Dataspace ID */ + hid_t did = H5I_INVALID_HID; /* Dataset ID */ + hid_t obj_id; /* Object ID for root group */ + char filename[1024]; /* File used in this test */ + ovisit2_ud_t udata; /* User-data for visiting */ + unsigned fields; /* Fields to return */ H5_index_t idx_type = H5_INDEX_NAME; - H5_iter_order_t order = H5_ITER_DEC; + H5_iter_order_t order = H5_ITER_DEC; bool vol_is_native; herr_t ret; /* Value returned from API calls */ @@ -1980,27 +1981,27 @@ test_h5o_visit2(void) CHECK(obj_id, FAIL, "H5Oopen"); /* Visit root with H5O_INFO_META_SIZE */ - udata.idx = 0; /* first object, i.e., root group */ - fields = H5O_INFO_META_SIZE; - ret = H5Ovisit2(obj_id, idx_type, order, visit2_obj_cb, &udata, fields); + udata.idx = 0; /* first object, i.e., root group */ + fields = H5O_INFO_META_SIZE; + ret = H5Ovisit2(obj_id, idx_type, order, visit2_obj_cb, &udata, fields); CHECK(ret, FAIL, "H5Ovisit2"); /* Verify that all objects were visitted */ VERIFY(udata.idx, NUM_OBJS, "idx should be the same as NUM_OBJS"); /* Visit root with H5O_INFO_BASIC */ - udata.idx = 0; /* first object, i.e., root group */ - fields = H5O_INFO_BASIC; - ret = H5Ovisit2(obj_id, idx_type, order, visit2_obj_cb, &udata, fields); + udata.idx = 0; /* first object, i.e., root group */ + fields = H5O_INFO_BASIC; + ret = H5Ovisit2(obj_id, idx_type, order, visit2_obj_cb, &udata, fields); CHECK(ret, FAIL, "H5Ovisit2"); /* Verify that all objects were visitted */ VERIFY(udata.idx, NUM_OBJS, "idx should be the same as NUM_OBJS"); /* Visit root with H5O_INFO_ALL */ - udata.idx = 0; /* first object, i.e., root group */ - fields = H5O_INFO_ALL; - ret = H5Ovisit2(obj_id, idx_type, order, visit2_obj_cb, &udata, fields); + udata.idx = 0; /* first object, i.e., root group */ + fields = H5O_INFO_ALL; + ret = H5Ovisit2(obj_id, idx_type, order, visit2_obj_cb, &udata, fields); CHECK(ret, FAIL, "H5Ovisit2"); /* Verify that all objects were visitted */