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 Jun 15, 2023
1 parent 76d0026 commit 62f4951
Show file tree
Hide file tree
Showing 43 changed files with 248 additions and 244 deletions.
2 changes: 1 addition & 1 deletion c++/examples/h5tutr_extend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ main(void)
prop = dataset->getCreatePlist();

// Get information to obtain memory dataspace.
rank = filespace->getSimpleExtentNdims();
rank = filespace->getSimpleExtentNdims();
(void)filespace->getSimpleExtentDims(dimsr);

if (H5D_CHUNKED == prop.getLayout()) {
Expand Down
2 changes: 1 addition & 1 deletion c++/test/ttypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using namespace H5;
*/

static const char *FILENAME[] = {"dtypes1.h5", "dtypes2.h5", "dtypes3.h5", "dtypes4.h5",
"encode_decode.h5", "h5_type_operators.h5", NULL};
"encode_decode.h5", "h5_type_operators.h5", NULL};

typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t;

Expand Down
2 changes: 1 addition & 1 deletion examples/h5_vds-exc.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ main(void)
kdims[3] = {KDIM0, KDIM1, KDIM2}, kdims_max[3] = {H5S_UNLIMITED, KDIM1, KDIM2},
ndims[3] = {NDIM0, NDIM1, NDIM2}, ndims_max[3] = {H5S_UNLIMITED, NDIM1, NDIM2},
start[3], /* Hyperslab parameters */
count[3], block[3];
count[3], block[3];
hsize_t start_out[3], stride_out[3], count_out[3], block_out[3];
int k = 2;
int n = 3;
Expand Down
2 changes: 1 addition & 1 deletion examples/h5_vds-exclim.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ main(void)
herr_t status;
hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, kdims[3] = {KDIM0, KDIM1, KDIM2},
ndims[3] = {NDIM0, NDIM1, NDIM2}, start[3], /* Hyperslab parameters */
count[3], block[3];
count[3], block[3];
hsize_t start_out[3], stride_out[3], count_out[3], block_out[3];
int k = 2;
int n = 3;
Expand Down
2 changes: 1 addition & 1 deletion hl/examples/ex_image2.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define PAL_NAME "palette"
#define PAL_ENTRIES 256

static int read_data(const char *file_name, hsize_t *width, hsize_t *height);
static int read_data(const char *file_name, hsize_t *width, hsize_t *height);
static unsigned char *gbuf = NULL; /* global buffer for image data */

int
Expand Down
6 changes: 3 additions & 3 deletions hl/src/H5DS.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
ds_list_t *dsbuf_w =
NULL; /* array of "REFERENCE_LIST" attribute data to write when adding new reference to a dataset */
hobj_ref_t ref_to_ds = 0; /* reference to the DS */
hobj_ref_t ref_j; /* iterator reference */
hobj_ref_t ref_j; /* iterator reference */

/* Variables to be used when new references are used */
nds_list_t ndsl;
nds_list_t *ndsbuf = NULL;
nds_list_t *ndsbuf_w = NULL;
nds_list_t *ndsbuf = NULL;
nds_list_t *ndsbuf_w = NULL;
H5R_ref_t nref_to_ds = {0};
H5R_ref_t nref_j;
hbool_t is_new_ref;
Expand Down
3 changes: 2 additions & 1 deletion hl/test/test_ld.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ static int one_tests[ONE_NTESTS] = {3, -1, 0, -9, 1};
* {4,10}->{4,12}; {4,10}->{4,9}; {4,10}->{4,10}
*/
#define TWO_NTESTS 9
static int two_tests[TWO_NTESTS][2] = {{2, 2}, {2, -1}, {2, 0}, {-1, 2}, {-1, -1}, {-1, 0}, {0, 2}, {0, -1}, {0, 0}};
static int two_tests[TWO_NTESTS][2] = {{2, 2}, {2, -1}, {2, 0}, {-1, 2}, {-1, -1},
{-1, 0}, {0, 2}, {0, -1}, {0, 0}};

/* Verify that the two input values are the same */
#define VERIFY_EQUAL(_x, _y) \
Expand Down
4 changes: 2 additions & 2 deletions src/H5Dchunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)

/* Different blocks depending on whether we're using selection I/O */
if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) {
size_t num_chunks = 0;
size_t num_chunks = 0;
size_t element_sizes[2] = {dset_info->type_info.src_type_size, 0};
void *bufs[2] = {dset_info->buf.vp, NULL};

Expand Down Expand Up @@ -3020,7 +3020,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info)

/* Different blocks depending on whether we're using selection I/O */
if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) {
size_t num_chunks = 0;
size_t num_chunks = 0;
size_t element_sizes[2] = {dset_info->type_info.dst_type_size, 0};
const void *bufs[2] = {dset_info->buf.cvp, NULL};

Expand Down
12 changes: 6 additions & 6 deletions src/H5FDint.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs
hbool_t extend_sizes = FALSE;
hbool_t extend_types = FALSE;
uint32_t i;
size_t size = 0;
H5FD_mem_t type = H5FD_MEM_DEFAULT;
size_t size = 0;
H5FD_mem_t type = H5FD_MEM_DEFAULT;
hid_t dxpl_id = H5I_INVALID_HID; /* DXPL for operation */
herr_t ret_value = SUCCEED; /* Return value */

Expand Down Expand Up @@ -762,8 +762,8 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin
hbool_t extend_bufs = FALSE;
uint32_t i;
size_t element_size = 0;
void *buf = NULL;
hbool_t use_vector = FALSE;
void *buf = NULL;
hbool_t use_vector = FALSE;
haddr_t addrs_local[H5FD_LOCAL_VECTOR_LEN];
haddr_t *addrs = addrs_local;
size_t sizes_local[H5FD_LOCAL_VECTOR_LEN];
Expand Down Expand Up @@ -1409,8 +1409,8 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui
hbool_t extend_bufs = FALSE;
uint32_t i;
size_t element_size = 0;
const void *buf = NULL;
hbool_t use_vector = FALSE;
const void *buf = NULL;
hbool_t use_vector = FALSE;
haddr_t addrs_local[H5FD_LOCAL_VECTOR_LEN];
haddr_t *addrs = addrs_local;
size_t sizes_local[H5FD_LOCAL_VECTOR_LEN];
Expand Down
4 changes: 2 additions & 2 deletions src/H5Pdxpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2399,8 +2399,8 @@ herr_t
H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper_t op, const hsize_t start[],
const hsize_t stride[], const hsize_t count[], const hsize_t block[])
{
H5P_genplist_t *plist = NULL; /* Property list pointer */
H5S_t *space = NULL; /* Dataspace to hold selection */
H5P_genplist_t *plist = NULL; /* Property list pointer */
H5S_t *space = NULL; /* Dataspace to hold selection */
hbool_t space_created = FALSE; /* Whether a new dataspace has been created */
hbool_t reset_prop_on_error = FALSE; /* Whether to reset the property on failure */
herr_t ret_value = SUCCEED; /* return value */
Expand Down
2 changes: 1 addition & 1 deletion src/H5VLpassthru.c
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_args_t *args, hid
H5VL_pass_through_t *new_o;
H5VL_file_specific_args_t my_args;
H5VL_file_specific_args_t *new_args;
H5VL_pass_through_info_t *info = NULL;
H5VL_pass_through_info_t *info = NULL;
hid_t under_vol_id = -1;
herr_t ret_value;

Expand Down
4 changes: 2 additions & 2 deletions test/app_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ typedef enum {
static const char *FILENAME[] = {"app_ref", NULL};

static const char *IDNAME[T_NUMCLASSES] = {"File", "Property List", "Property Class", "Datatype",
"Dataspace", "Dataset", "Attribute", "Group",
"Error Class", "Error Message", "Error Stack"};
"Dataspace", "Dataset", "Attribute", "Group",
"Error Class", "Error Message", "Error Stack"};

static int rc[T_NUMCLASSES];

Expand Down
26 changes: 13 additions & 13 deletions test/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -14156,7 +14156,7 @@ static unsigned
check_double_pin_err(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -14241,7 +14241,7 @@ static unsigned
check_double_unpin_err(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -14335,7 +14335,7 @@ static unsigned
check_pin_entry_errs(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -14442,7 +14442,7 @@ check_pin_entry_errs(unsigned paged)
static unsigned
check_double_protect_err(unsigned paged)
{
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *cache_entry_ptr;

Expand Down Expand Up @@ -14525,7 +14525,7 @@ static unsigned
check_double_unprotect_err(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -14606,7 +14606,7 @@ static unsigned
check_mark_entry_dirty_errs(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -14685,7 +14685,7 @@ static unsigned
check_expunge_entry_errs(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -14797,9 +14797,9 @@ static unsigned
check_move_entry_errs(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
test_entry_t *entry_ptr = NULL;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
test_entry_t *entry_ptr = NULL;
test_entry_t *entry_0_0_ptr = NULL;
test_entry_t *entry_0_1_ptr = NULL;
test_entry_t *entry_1_0_ptr = NULL;
Expand Down Expand Up @@ -14914,7 +14914,7 @@ static unsigned
check_resize_entry_errs(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -15015,7 +15015,7 @@ static unsigned
check_unprotect_ro_dirty_err(unsigned paged)
{
herr_t result;
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;

if (paged)
Expand Down Expand Up @@ -15135,7 +15135,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
static unsigned
check_protect_ro_rw_err(unsigned paged)
{
H5F_t *file_ptr = NULL;
H5F_t *file_ptr = NULL;
test_entry_t *entry_ptr = NULL;
void *thing_ptr = NULL;

Expand Down
8 changes: 4 additions & 4 deletions test/cache_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
void
move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
{
herr_t result = 0;
herr_t result = 0;
hbool_t done = TRUE; /* will set to FALSE if we have work to do */
haddr_t old_addr = HADDR_UNDEF;
haddr_t new_addr = HADDR_UNDEF;
Expand Down Expand Up @@ -4946,7 +4946,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
int64_t cache_hits = 0;
int64_t cache_accesses = 0;
double expected_hit_rate;
double hit_rate = 0.0;
double hit_rate = 0.0;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;

Expand Down Expand Up @@ -5066,8 +5066,8 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
size_t cur_size = 0;
uint32_t expected_cur_num_entries;
int cur_num_entries = 0;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;

/* get a pointer to the files internal data structure */
if (pass) {
Expand Down
8 changes: 4 additions & 4 deletions test/cache_tagging.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@ check_file_open_tags(hid_t fcpl, int type)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
int verbose = FALSE; /* verbose file output */
#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag; /* Root Group Tag */
int verbose = FALSE; /* verbose file output */
#endif /* NDEBUG */
hid_t fapl = -1; /* File access prop list */
haddr_t root_tag; /* Root Group Tag */
haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */

/* Testing Macro */
Expand Down
12 changes: 6 additions & 6 deletions test/chunk_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@

/* Test file names, using H5F_libver_t as indices */
static const char *FILENAME[] = {"tchunk_info_earliest",
"tchunk_info_v18",
"tchunk_info_v110",
"tchunk_info_v112",
"tchunk_info_v114",
"tchunk_info_v116",
NULL};
"tchunk_info_v18",
"tchunk_info_v110",
"tchunk_info_v112",
"tchunk_info_v114",
"tchunk_info_v116",
NULL};

/* File to be used in test_failed_attempts */
#define FILTERMASK_FILE "tflt_msk"
Expand Down
58 changes: 29 additions & 29 deletions test/dsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,35 +56,35 @@
#endif

static const char *FILENAME[] = {"dataset", /* 0 */
"compact_dataset", /* 1 */
"dset_offset", /* 2 */
"max_compact_dataset", /* 3 */
"simple", /* 4 */
"set_local", /* 5 */
"random_chunks", /* 6 */
"huge_chunks", /* 7 */
"chunk_cache", /* 8 */
"big_chunk", /* 9 */
"chunk_fast", /* 10 */
"chunk_expand", /* 11 */
"chunk_fixed", /* 12 */
"copy_dcpl_newfile", /* 13 */
"partial_chunks", /* 14 */
"layout_extend", /* 15 */
"zero_chunk", /* 16 */
"chunk_single", /* 17 */
"swmr_non_latest", /* 18 */
"earray_hdr_fd", /* 19 */
"farray_hdr_fd", /* 20 */
"bt2_hdr_fd", /* 21 */
"storage_size", /* 22 */
"dls_01_strings", /* 23 */
"power2up", /* 24 */
"version_bounds", /* 25 */
"alloc_0sized", /* 26 */
"h5s_block", /* 27 */
"h5s_plist", /* 28 */
NULL};
"compact_dataset", /* 1 */
"dset_offset", /* 2 */
"max_compact_dataset", /* 3 */
"simple", /* 4 */
"set_local", /* 5 */
"random_chunks", /* 6 */
"huge_chunks", /* 7 */
"chunk_cache", /* 8 */
"big_chunk", /* 9 */
"chunk_fast", /* 10 */
"chunk_expand", /* 11 */
"chunk_fixed", /* 12 */
"copy_dcpl_newfile", /* 13 */
"partial_chunks", /* 14 */
"layout_extend", /* 15 */
"zero_chunk", /* 16 */
"chunk_single", /* 17 */
"swmr_non_latest", /* 18 */
"earray_hdr_fd", /* 19 */
"farray_hdr_fd", /* 20 */
"bt2_hdr_fd", /* 21 */
"storage_size", /* 22 */
"dls_01_strings", /* 23 */
"power2up", /* 24 */
"version_bounds", /* 25 */
"alloc_0sized", /* 26 */
"h5s_block", /* 27 */
"h5s_plist", /* 28 */
NULL};

#define OHMIN_FILENAME_A "ohdr_min_a"

Expand Down
2 changes: 1 addition & 1 deletion test/dtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
} while (0)

static const char *FILENAME[] = {"dtypes0", "dtypes1", "dtypes2", "dtypes3", "dtypes4", "dtypes5",
"dtypes6", "dtypes7", "dtypes8", "dtypes9", "dtypes10", NULL};
"dtypes6", "dtypes7", "dtypes8", "dtypes9", "dtypes10", NULL};

#define TESTFILE "bad_compound.h5"

Expand Down
Loading

0 comments on commit 62f4951

Please sign in to comment.