summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgithub-actions <41898282+github-actions[bot]@users.noreply.github.com>2022-03-22 02:04:50 (GMT)
committergithub-actions <41898282+github-actions[bot]@users.noreply.github.com>2022-03-22 02:04:50 (GMT)
commit6d098abff9c0977a33308f48073605db5b7c65b8 (patch)
tree1ca58edcf44b6be51f536c03e6927980fbe14350
parentffdeb5bceff3e951f1cd64f30643f23c8846d139 (diff)
downloadhdf5-6d098abff9c0977a33308f48073605db5b7c65b8.zip
hdf5-6d098abff9c0977a33308f48073605db5b7c65b8.tar.gz
hdf5-6d098abff9c0977a33308f48073605db5b7c65b8.tar.bz2
Committing clang-format changes
-rw-r--r--tools/src/h5diff/h5diff_common.c10
-rw-r--r--tools/test/h5diff/h5diffgentest.c106
-rw-r--r--tools/test/h5dump/h5dumpgentest.c44
3 files changed, 77 insertions, 83 deletions
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 8ec7cb6..452af3d 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -472,16 +472,14 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
break;
case '0':
onion_fa_g_2.revision_id = (uint64_t)HDatol(H5_optarg);
-
-
}
}
/* Copy the VFD driver info for both the files */
if (driver_name_g_1) {
if (!HDstrcmp(driver_name_g_1, "onion")) {
- opts->vfd_info[0].name = HDstrdup(driver_name_g_1);
- opts->vfd_info[0].info = HDmalloc(sizeof(H5FD_onion_fapl_info_t));
+ opts->vfd_info[0].name = HDstrdup(driver_name_g_1);
+ opts->vfd_info[0].info = HDmalloc(sizeof(H5FD_onion_fapl_info_t));
HDmemcpy(opts->vfd_info[0].info, &onion_fa_g_1, sizeof(H5FD_onion_fapl_info_t));
}
@@ -491,8 +489,8 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char
if (driver_name_g_2) {
if (!HDstrcmp(driver_name_g_2, "onion")) {
- opts->vfd_info[1].name = HDstrdup(driver_name_g_2);
- opts->vfd_info[1].info = HDmalloc(sizeof(H5FD_onion_fapl_info_t));
+ opts->vfd_info[1].name = HDstrdup(driver_name_g_2);
+ opts->vfd_info[1].info = HDmalloc(sizeof(H5FD_onion_fapl_info_t));
HDmemcpy(opts->vfd_info[1].info, &onion_fa_g_2, sizeof(H5FD_onion_fapl_info_t));
}
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 8ad196c..7f1a346 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -38,33 +38,33 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
*-------------------------------------------------------------------------
*/
-#define FILE1 "h5diff_basic1.h5"
-#define FILE2 "h5diff_basic2.h5"
-#define FILE3 "h5diff_types.h5"
-#define FILE4 "h5diff_dtypes.h5"
-#define FILE5 "h5diff_attr1.h5"
-#define FILE6 "h5diff_attr2.h5"
-#define FILE6a "h5diff_attr3.h5"
-#define FILE7 "h5diff_dset1.h5"
-#define FILE8 "h5diff_dset2.h5"
-#define FILE8A "h5diff_dset3.h5"
-#define FILE9 "h5diff_hyper1.h5"
-#define FILE10 "h5diff_hyper2.h5"
-#define FILE11 "h5diff_empty.h5"
-#define FILE12 "h5diff_links.h5"
-#define FILE13 "h5diff_softlinks.h5"
-#define FILE14 "h5diff_linked_softlink.h5"
-#define FILE15 "h5diff_extlink_src.h5"
-#define FILE16 "h5diff_extlink_trg.h5"
-#define FILE17 "h5diff_ext2softlink_src.h5"
-#define FILE18 "h5diff_ext2softlink_trg.h5"
-#define FILE19 "h5diff_dset_zero_dim_size1.h5"
-#define FILE20 "h5diff_dset_zero_dim_size2.h5"
-#define FILE21 "h5diff_dset_idx1.h5"
-#define FILE22 "h5diff_dset_idx2.h5"
-#define FILE23 "h5diff_onion_dset_1d.h5"
-#define FILE24 "h5diff_onion_objs.h5"
-#define FILE25 "h5diff_onion_dset_ext.h5"
+#define FILE1 "h5diff_basic1.h5"
+#define FILE2 "h5diff_basic2.h5"
+#define FILE3 "h5diff_types.h5"
+#define FILE4 "h5diff_dtypes.h5"
+#define FILE5 "h5diff_attr1.h5"
+#define FILE6 "h5diff_attr2.h5"
+#define FILE6a "h5diff_attr3.h5"
+#define FILE7 "h5diff_dset1.h5"
+#define FILE8 "h5diff_dset2.h5"
+#define FILE8A "h5diff_dset3.h5"
+#define FILE9 "h5diff_hyper1.h5"
+#define FILE10 "h5diff_hyper2.h5"
+#define FILE11 "h5diff_empty.h5"
+#define FILE12 "h5diff_links.h5"
+#define FILE13 "h5diff_softlinks.h5"
+#define FILE14 "h5diff_linked_softlink.h5"
+#define FILE15 "h5diff_extlink_src.h5"
+#define FILE16 "h5diff_extlink_trg.h5"
+#define FILE17 "h5diff_ext2softlink_src.h5"
+#define FILE18 "h5diff_ext2softlink_trg.h5"
+#define FILE19 "h5diff_dset_zero_dim_size1.h5"
+#define FILE20 "h5diff_dset_zero_dim_size2.h5"
+#define FILE21 "h5diff_dset_idx1.h5"
+#define FILE22 "h5diff_dset_idx2.h5"
+#define FILE23 "h5diff_onion_dset_1d.h5"
+#define FILE24 "h5diff_onion_objs.h5"
+#define FILE25 "h5diff_onion_dset_ext.h5"
#define DANGLE_LINK_FILE1 "h5diff_danglelinks1.h5"
#define DANGLE_LINK_FILE2 "h5diff_danglelinks2.h5"
@@ -190,7 +190,7 @@ static void test_double_epsilon(const char *fname1, const char *fname2);
/* Generate the files for testing Onion VFD */
static int test_onion_1d_dset(const char *fname);
-static int test_onion_create_delete_objects(const char *fname);
+static int test_onion_create_delete_objects(const char *fname);
static int test_onion_dset_extension(const char *fname);
/* called by test_attributes() and test_datasets() */
@@ -314,9 +314,9 @@ main(void)
/* Generate the files for testing Onion VFD */
test_onion_1d_dset(FILE23);
- test_onion_create_delete_objects(FILE24);
+ test_onion_create_delete_objects(FILE24);
test_onion_dset_extension(FILE25);
-
+
return EXIT_SUCCESS;
}
@@ -500,14 +500,14 @@ test_onion_1d_dset(const char *fname)
*----------------------------------------------------------------------
*/
file_id = H5Fopen(paths->canon, H5F_ACC_RDWR, fapl_id);
- goto error;
+ goto error;
if (H5I_INVALID_HID == file_id) {
printf("\n\n\n\nERROR OPENING\n\n\n\n");
goto error;
}
dset = H5Dopen(file_id, "DS1", H5P_DEFAULT);
- goto error;
+ goto error;
if (dset < 0) {
printf("\n\n\n\nERROR OPENING DSET\n\n\n\n");
goto error;
@@ -550,12 +550,12 @@ test_onion_1d_dset(const char *fname)
goto error;
if (H5Pclose(fapl_id) < 0)
goto error;
- if (H5Pclose(onion_info.backing_fapl_id) < 0)
+ if (H5Pclose(onion_info.backing_fapl_id) < 0)
goto error;
onion_filepaths_destroy(paths);
- return 0;
+ return 0;
error:
H5E_BEGIN_TRY
@@ -586,10 +586,10 @@ test_onion_create_delete_objects(const char *fname)
0, /* creation flags, was H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT */
"initial commit" /* comment */
};
- hid_t group_id = H5I_INVALID_HID;
- hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
- hsize_t attr_dim[1] = {4};
-
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
+ hsize_t attr_dim[1] = {4};
+
/* Set up */
if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -609,7 +609,7 @@ test_onion_create_delete_objects(const char *fname)
hid_t file, space, dset, dcpl; /* Handles */
hsize_t dims[2] = {4, 4}, maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, chunk[2] = {4, 4};
int wdata[4][4], /* Write buffer */
- fillval, i, j;
+ fillval, i, j;
/*
* Initialize data.
@@ -630,7 +630,7 @@ test_onion_create_delete_objects(const char *fname)
if ((space = H5Screate_simple(2, dims, maxdims)) < 0)
goto error;
- /*
+ /*
* Create the dataset creation property list, and set the chunk
* size.
*/
@@ -672,7 +672,7 @@ test_onion_create_delete_objects(const char *fname)
goto error;
/*----------------------------------------------------------------------
- * First revision: open the file with Onion VFD and add a dataset (DS2) to the file
+ * First revision: open the file with Onion VFD and add a dataset (DS2) to the file
*----------------------------------------------------------------------
*/
if ((file = H5Fopen(paths->canon, H5F_ACC_RDWR, fapl_id)) < 0)
@@ -690,7 +690,6 @@ test_onion_create_delete_objects(const char *fname)
if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata) < 0)
goto error;
-
if (H5Dclose(dset) < 0)
goto error;
dset = H5I_INVALID_HID;
@@ -708,7 +707,7 @@ test_onion_create_delete_objects(const char *fname)
if (H5Ldelete(file, "DS2", H5P_DEFAULT) < 0)
goto error;
-
+
if (H5Fclose(file) < 0)
goto error;
file = H5I_INVALID_HID;
@@ -723,7 +722,8 @@ test_onion_create_delete_objects(const char *fname)
/* Create dataspace for attribute */
attr_space_id = H5Screate_simple(1, attr_dim, NULL);
- if ((attr_id = H5Acreate(file, "file_attribute", H5T_STD_I32LE, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id =
+ H5Acreate(file, "file_attribute", H5T_STD_I32LE, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Sclose(attr_space_id) < 0)
@@ -809,7 +809,7 @@ error:
if (fapl_id != H5I_INVALID_HID)
(void)H5Pclose(fapl_id);
if (onion_info.backing_fapl_id != H5I_INVALID_HID)
- H5Pclose(onion_info.backing_fapl_id);
+ H5Pclose(onion_info.backing_fapl_id);
return -1;
} /* test_onion_create_delete_objects */
@@ -830,15 +830,15 @@ test_onion_dset_extension(const char *fname)
0, /* creation flags, was H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT */
"initial commit" /* comment */
};
- hid_t file = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
- hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
+ hid_t file = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
+ hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
hid_t space, dset_space, dset, dcpl; /* Handles */
hsize_t dims[2] = {4, 4}, maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, chunk[2] = {4, 4};
hsize_t size[2], offset[2];
int wdata[4][4], /* Write buffer */
- fillval, i, j;
- int rdata[4][4]; /* Read buffer */
-
+ fillval, i, j;
+ int rdata[4][4]; /* Read buffer */
+
/* Setup */
if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -874,7 +874,7 @@ test_onion_dset_extension(const char *fname)
if ((space = H5Screate_simple(2, dims, maxdims)) < 0)
goto error;
- /*
+ /*
* Create the dataset creation property list, and set the chunk
* size.
*/
@@ -8767,8 +8767,6 @@ error:
H5E_END_TRY;
}
-
-
/*-------------------------------------------------------------------------
* Function: write_attr
*
@@ -8854,5 +8852,3 @@ error:
return FAIL;
} /* end write_dset() */
-
-
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 9c48573..6dbb700 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -11417,14 +11417,14 @@ gent_onion_1d_dset()
*----------------------------------------------------------------------
*/
file_id = H5Fopen(paths->canon, H5F_ACC_RDWR, fapl_id);
- goto error;
+ goto error;
if (H5I_INVALID_HID == file_id) {
printf("\n\n\n\nERROR OPENING\n\n\n\n");
goto error;
}
dset = H5Dopen(file_id, "DS1", H5P_DEFAULT);
- goto error;
+ goto error;
if (dset < 0) {
printf("\n\n\n\nERROR OPENING DSET\n\n\n\n");
goto error;
@@ -11467,12 +11467,12 @@ gent_onion_1d_dset()
goto error;
if (H5Pclose(fapl_id) < 0)
goto error;
- if (H5Pclose(onion_info.backing_fapl_id) < 0)
+ if (H5Pclose(onion_info.backing_fapl_id) < 0)
goto error;
onion_filepaths_destroy(paths);
- return 0;
+ return 0;
error:
H5E_BEGIN_TRY
@@ -11503,10 +11503,10 @@ gent_onion_create_delete_objects(void)
0, /* creation flags, was H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT */
"initial commit" /* comment */
};
- hid_t group_id = H5I_INVALID_HID;
- hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
- hsize_t attr_dim[1] = {4};
-
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
+ hsize_t attr_dim[1] = {4};
+
/* Set up */
if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -11526,7 +11526,7 @@ gent_onion_create_delete_objects(void)
hid_t file, space, dset, dcpl; /* Handles */
hsize_t dims[2] = {4, 4}, maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, chunk[2] = {4, 4};
int wdata[4][4], /* Write buffer */
- fillval, i, j;
+ fillval, i, j;
/*
* Initialize data.
@@ -11547,7 +11547,7 @@ gent_onion_create_delete_objects(void)
if ((space = H5Screate_simple(2, dims, maxdims)) < 0)
goto error;
- /*
+ /*
* Create the dataset creation property list, and set the chunk
* size.
*/
@@ -11589,7 +11589,7 @@ gent_onion_create_delete_objects(void)
goto error;
/*----------------------------------------------------------------------
- * First revision: open the file with Onion VFD and add a dataset (DS2) to the file
+ * First revision: open the file with Onion VFD and add a dataset (DS2) to the file
*----------------------------------------------------------------------
*/
if ((file = H5Fopen(paths->canon, H5F_ACC_RDWR, fapl_id)) < 0)
@@ -11607,7 +11607,6 @@ gent_onion_create_delete_objects(void)
if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata) < 0)
goto error;
-
if (H5Dclose(dset) < 0)
goto error;
dset = H5I_INVALID_HID;
@@ -11625,7 +11624,7 @@ gent_onion_create_delete_objects(void)
if (H5Ldelete(file, "DS2", H5P_DEFAULT) < 0)
goto error;
-
+
if (H5Fclose(file) < 0)
goto error;
file = H5I_INVALID_HID;
@@ -11640,7 +11639,8 @@ gent_onion_create_delete_objects(void)
/* Create dataspace for attribute */
attr_space_id = H5Screate_simple(1, attr_dim, NULL);
- if ((attr_id = H5Acreate(file, "file_attribute", H5T_STD_I32LE, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if ((attr_id =
+ H5Acreate(file, "file_attribute", H5T_STD_I32LE, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Sclose(attr_space_id) < 0)
@@ -11726,7 +11726,7 @@ error:
if (fapl_id != H5I_INVALID_HID)
(void)H5Pclose(fapl_id);
if (onion_info.backing_fapl_id != H5I_INVALID_HID)
- H5Pclose(onion_info.backing_fapl_id);
+ H5Pclose(onion_info.backing_fapl_id);
return -1;
} /* gent_onion_create_delete_objects */
@@ -11747,15 +11747,15 @@ gent_onion_dset_extension(void)
0, /* creation flags, was H5FD_ONION_FAPL_INFO_CREATE_FLAG_ENABLE_PAGE_ALIGNMENT */
"initial commit" /* comment */
};
- hid_t file = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
- hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
+ hid_t file = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
+ hid_t attr_space_id = H5I_INVALID_HID, attr_id = H5I_INVALID_HID;
hid_t space, dset_space, dset, dcpl; /* Handles */
hsize_t dims[2] = {4, 4}, maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, chunk[2] = {4, 4};
hsize_t size[2], offset[2];
int wdata[4][4], /* Write buffer */
- fillval, i, j;
- int rdata[4][4]; /* Read buffer */
-
+ fillval, i, j;
+ int rdata[4][4]; /* Read buffer */
+
/* Setup */
if ((onion_info.backing_fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
@@ -11791,7 +11791,7 @@ gent_onion_dset_extension(void)
if ((space = H5Screate_simple(2, dims, maxdims)) < 0)
goto error;
- /*
+ /*
* Create the dataset creation property list, and set the chunk
* size.
*/
@@ -12028,7 +12028,7 @@ main(void)
/* Generate the files for testing Onion VFD */
gent_onion_1d_dset();
- gent_onion_create_delete_objects();
+ gent_onion_create_delete_objects();
gent_onion_dset_extension();
return 0;