Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 11, 2024
1 parent 9516ebb commit 001d94c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/H5FDfamily.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ H5FD__family_get_default_printf_filename(const char *old_filename)
file_extension = strrchr(old_filename, '.');
if (file_extension) {
intptr_t beginningLength = file_extension - old_filename;
snprintf(tmp_buffer, new_filename_len, "%.*s%s%s", (int)beginningLength, old_filename, suffix, file_extension);
snprintf(tmp_buffer, new_filename_len, "%.*s%s%s", (int)beginningLength, old_filename, suffix,
file_extension);
}
else {
/* If the filename doesn't contain an extension at all, just insert
Expand Down
3 changes: 2 additions & 1 deletion src/H5FDsplitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch
file_extension = strrchr(base_filename, '.');
if (file_extension) {
intptr_t beginningLength = file_extension - base_filename;
snprintf(new_path, new_path_len, "%.*s%s%s", (int)beginningLength, base_filename, suffix, file_extension);
snprintf(new_path, new_path_len, "%.*s%s%s", (int)beginningLength, base_filename, suffix,
file_extension);
}
else {
/* If the filename doesn't contain an extension at all, just insert
Expand Down
9 changes: 6 additions & 3 deletions test/API/H5_api_dataset_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,8 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_alloc_time_test);
}

snprintf(name, sizeof(name), "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME, i);
snprintf(name, sizeof(name), "%s%zu", DATASET_CREATION_PROPERTIES_TEST_ALLOC_TIMES_BASE_NAME,
i);

if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
Expand Down Expand Up @@ -2230,7 +2231,8 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_attr_crt_order_test);
}

snprintf(name, sizeof(name), "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME, i);
snprintf(name, sizeof(name), "%s%zu", DATASET_CREATION_PROPERTIES_TEST_CRT_ORDER_BASE_NAME,
i);

if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
Expand Down Expand Up @@ -2363,7 +2365,8 @@ test_create_dataset_creation_properties(void)
PART_ERROR(DCPL_fill_time_property_test);
}

snprintf(name, sizeof(name), "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME, i);
snprintf(name, sizeof(name), "%s%zu", DATASET_CREATION_PROPERTIES_TEST_FILL_TIMES_BASE_NAME,
i);

if ((dset_id = H5Dcreate2(group_id, name, dset_dtype, fspace_id, H5P_DEFAULT, dcpl_id,
H5P_DEFAULT)) < 0) {
Expand Down
8 changes: 4 additions & 4 deletions test/filter_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ test_creating_groups_using_plugins(hid_t fid)

/* Create multiple groups under the top-level group */
for (i = 0; i < N_SUBGROUPS; i++) {
int offset = snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
char *sp = subgroup_name + offset;
int offset = snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
char *sp = subgroup_name + offset;
snprintf(sp, sizeof(subgroup_name) - offset, "%d", i);

if ((sub_gid = H5Gcreate2(gid, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
Expand Down Expand Up @@ -905,8 +905,8 @@ test_opening_groups_using_plugins(hid_t fid)

/* Open all the sub-groups under the top-level group */
for (i = 0; i < N_SUBGROUPS; i++) {
int offset = snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
char *sp = subgroup_name + offset;
int offset = snprintf(subgroup_name, sizeof(subgroup_name), SUBGROUP_PREFIX);
char *sp = subgroup_name + offset;
snprintf(sp, sizeof(subgroup_name) - offset, "%d", i);

if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0)
Expand Down
9 changes: 6 additions & 3 deletions testpar/t_vfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3987,17 +3987,20 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer

if (xfer_mode == H5FD_MPIO_INDEPENDENT) {

snprintf(test_title, sizeof(test_title), "parallel vector write test 7 -- %s / independent", vfd_name);
snprintf(test_title, sizeof(test_title), "parallel vector write test 7 -- %s / independent",
vfd_name);
}
else if (coll_opt_mode == H5FD_MPIO_INDIVIDUAL_IO) {

snprintf(test_title, sizeof(test_title), "parallel vector write test 7 -- %s / col op / ind I/O", vfd_name);
snprintf(test_title, sizeof(test_title), "parallel vector write test 7 -- %s / col op / ind I/O",
vfd_name);
}
else {

assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO);

snprintf(test_title, sizeof(test_title), "parallel vector write test 7 -- %s / col op / col I/O", vfd_name);
snprintf(test_title, sizeof(test_title), "parallel vector write test 7 -- %s / col op / col I/O",
vfd_name);
}

TESTING(test_title);
Expand Down

0 comments on commit 001d94c

Please sign in to comment.