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 Oct 3, 2024
1 parent e4c03ff commit 98a9192
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 57 deletions.
18 changes: 9 additions & 9 deletions src/H5Gname.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
assert(fullpath);
prefix = H5G__component(prefix, &nchars2);
assert(prefix);
if (NULL == (fullpath = H5G__component(fullpath, &nchars1)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve pointer to path component");
if (SIZE_MAX == nchars1)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve component length");
nchars2 = SIZE_MAX;
if (NULL == (prefix = H5G__component(prefix, &nchars2)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve pointer to path component");
if (SIZE_MAX == nchars2)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve component length");
if (NULL == (fullpath = H5G__component(fullpath, &nchars1)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve pointer to path component");
if (SIZE_MAX == nchars1)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve component length");
nchars2 = SIZE_MAX;
if (NULL == (prefix = H5G__component(prefix, &nchars2)))
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve pointer to path component");
if (SIZE_MAX == nchars2)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve component length");
} /* end if */
else
HGOTO_DONE(false);
Expand Down
41 changes: 21 additions & 20 deletions src/H5HFsection.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,10 @@ H5HF__sect_single_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, size_t amt)
static herr_t
H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
{
haddr_t dblock_addr = HADDR_UNDEF; /* Section's direct block's address */
size_t dblock_size = SIZE_MAX; /* Section's direct block's size */
size_t dblock_overhead; /* Direct block's overhead */
herr_t ret_value = SUCCEED; /* Return value */
haddr_t dblock_addr = HADDR_UNDEF; /* Section's direct block's address */
size_t dblock_size = SIZE_MAX; /* Section's direct block's size */
size_t dblock_overhead; /* Direct block's overhead */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE

Expand Down Expand Up @@ -975,9 +975,9 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
H5HF_sect_add_ud_t *udata = (H5HF_sect_add_ud_t *)_udata; /* User callback data */
H5HF_hdr_t *hdr = udata->hdr; /* Fractal heap header */
H5HF_direct_t *dblock; /* Pointer to direct block for section */
haddr_t dblock_addr = HADDR_UNDEF; /* Section's direct block's address */
size_t dblock_size = SIZE_MAX; /* Section's direct block's size */
herr_t ret_value = SUCCEED; /* Return value */
haddr_t dblock_addr = HADDR_UNDEF; /* Section's direct block's address */
size_t dblock_size = SIZE_MAX; /* Section's direct block's size */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE

Expand Down Expand Up @@ -1074,7 +1074,7 @@ static herr_t
H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5FS_section_info_t *_sect)
{
const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */
herr_t ret_value = SUCCEED; /* Return value */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE

Expand All @@ -1086,8 +1086,8 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
/* (not enough information to check on a single section in a root direct block) */
if (sect->u.single.parent != NULL) {
H5HF_indirect_t *iblock; /* Indirect block that section's direct block resides in */
haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */
size_t dblock_size = SIZE_MAX; /* Direct block size */
haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */
size_t dblock_size = SIZE_MAX; /* Direct block size */
unsigned dblock_status = 0; /* Direct block's status in the metadata cache */
size_t H5_ATTR_NDEBUG_UNUSED dblock_overhead; /* Direct block's overhead */
herr_t H5_ATTR_NDEBUG_UNUSED status; /* Generic status value */
Expand All @@ -1097,7 +1097,8 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
assert(H5_addr_defined(iblock->ents[sect->u.single.par_entry].addr));

/* Retrieve direct block address from section */
if (H5HF__sect_single_dblock_info(iblock->hdr, (const H5HF_free_section_t *)sect, &dblock_addr, &dblock_size) < 0)
if (H5HF__sect_single_dblock_info(iblock->hdr, (const H5HF_free_section_t *)sect, &dblock_addr,
&dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information");
if (!H5_addr_defined(dblock_addr))
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve data block address");
Expand Down Expand Up @@ -3271,15 +3272,15 @@ H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect)
static herr_t
H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H5HF_free_section_t *row_sect2)
{
H5HF_free_section_t *sect1 = NULL, *sect2 = NULL; /* Indirect sections underlying row sections */
unsigned start_entry1; /* Start entry for section #1 */
unsigned start_row1, start_col1; /* Starting row & column for section #1 */
unsigned end_entry1; /* End entry for section #1 */
unsigned end_row1; /* Ending row for section #1 */
unsigned start_row2; /* Starting row for section #2 */
bool merged_rows; /* Flag to indicate that rows was merged together */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
H5HF_free_section_t *sect1 = NULL, *sect2 = NULL; /* Indirect sections underlying row sections */
unsigned start_entry1; /* Start entry for section #1 */
unsigned start_row1, start_col1; /* Starting row & column for section #1 */
unsigned end_entry1; /* End entry for section #1 */
unsigned end_row1; /* Ending row for section #1 */
unsigned start_row2; /* Starting row for section #2 */
bool merged_rows; /* Flag to indicate that rows was merged together */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_PACKAGE

Expand Down
48 changes: 24 additions & 24 deletions src/H5MF.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,14 +1232,14 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
htri_t
H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsize_t extra_requested)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5AC_ring_t fsm_ring; /* Ring of FSM */
haddr_t end; /* End of block to extend */
H5FD_mem_t map_type; /* Mapped type */
H5F_mem_page_t fs_type = H5F_MEM_PAGE_NTYPES; /* free space type */
htri_t allow_extend = true; /* Possible to extend the block */
hsize_t frag_size = 0; /* Size of mis-aligned fragment */
htri_t ret_value = false; /* Return value */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5AC_ring_t fsm_ring; /* Ring of FSM */
haddr_t end; /* End of block to extend */
H5FD_mem_t map_type; /* Mapped type */
H5F_mem_page_t fs_type = H5F_MEM_PAGE_NTYPES; /* free space type */
htri_t allow_extend = true; /* Possible to extend the block */
hsize_t frag_size = 0; /* Size of mis-aligned fragment */
htri_t ret_value = false; /* Return value */

FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
Expand Down Expand Up @@ -2555,14 +2555,14 @@ H5MF_settle_raw_data_fsm(H5F_t *f, bool *fsm_settled)
{
int pass_count;
hsize_t alloc_size;
H5F_mem_t mem_type; /* Memory type for iteration */
H5F_mem_page_t fsm_type = H5F_MEM_PAGE_NTYPES; /* FSM type for iteration */
H5O_fsinfo_t fsinfo; /* Free space manager info message */
H5FS_stat_t fs_stat; /* Information for free-space manager */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5AC_ring_t curr_ring = H5AC_RING_INV; /* Current ring value */
H5AC_ring_t needed_ring = H5AC_RING_INV; /* Ring value needed for this iteration */
herr_t ret_value = SUCCEED; /* Return value */
H5F_mem_t mem_type; /* Memory type for iteration */
H5F_mem_page_t fsm_type = H5F_MEM_PAGE_NTYPES; /* FSM type for iteration */
H5O_fsinfo_t fsinfo; /* Free space manager info message */
H5FS_stat_t fs_stat; /* Information for free-space manager */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5AC_ring_t curr_ring = H5AC_RING_INV; /* Current ring value */
H5AC_ring_t needed_ring = H5AC_RING_INV; /* Ring value needed for this iteration */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)

Expand Down Expand Up @@ -3021,8 +3021,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, bool *fsm_settled)
herr_t
H5MF_settle_meta_data_fsm(H5F_t *f, bool *fsm_settled)
{
H5F_mem_page_t sm_fshdr_fs_type = H5F_MEM_PAGE_NTYPES; /* small fs hdr fsm */
H5F_mem_page_t sm_fssinfo_fs_type = H5F_MEM_PAGE_NTYPES; /* small fs sinfo fsm */
H5F_mem_page_t sm_fshdr_fs_type = H5F_MEM_PAGE_NTYPES; /* small fs hdr fsm */
H5F_mem_page_t sm_fssinfo_fs_type = H5F_MEM_PAGE_NTYPES; /* small fs sinfo fsm */
H5F_mem_page_t lg_fshdr_fs_type = H5F_MEM_PAGE_DEFAULT; /* large fs hdr fsm */
H5F_mem_page_t lg_fssinfo_fs_type = H5F_MEM_PAGE_DEFAULT; /* large fs sinfo fsm */
H5FS_t *sm_hdr_fspace = NULL; /* ptr to sm FSM hdr alloc FSM */
Expand Down Expand Up @@ -3312,11 +3312,11 @@ H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_s
static bool
H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
{
H5F_mem_page_t sm_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t sm_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t sm_fssinfo_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t lg_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t lg_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t lg_fssinfo_fsm = H5F_MEM_PAGE_NTYPES;
bool result = false;
bool result = false;

FUNC_ENTER_PACKAGE_NOERR

Expand Down Expand Up @@ -3364,9 +3364,9 @@ H5MF__fsm_type_is_self_referential(H5F_shared_t *f_sh, H5F_mem_page_t fsm_type)
static bool
H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace)
{
H5F_mem_page_t sm_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t sm_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t sm_fssinfo_fsm = H5F_MEM_PAGE_NTYPES;
bool result = false;
bool result = false;

FUNC_ENTER_PACKAGE_NOERR

Expand All @@ -3378,7 +3378,7 @@ H5MF__fsm_is_self_referential(H5F_shared_t *f_sh, H5FS_t *fspace)
H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_SINFO, (size_t)1, &sm_fssinfo_fsm);

if (H5F_SHARED_PAGED_AGGR(f_sh)) {
H5F_mem_page_t lg_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t lg_fshdr_fsm = H5F_MEM_PAGE_NTYPES;
H5F_mem_page_t lg_fssinfo_fsm = H5F_MEM_PAGE_NTYPES;

H5MF__alloc_to_fs_type(f_sh, H5FD_MEM_FSPACE_HDR, f_sh->fs_page_size + 1, &lg_fshdr_fsm);
Expand Down
8 changes: 4 additions & 4 deletions src/H5Shyper.c
Original file line number Diff line number Diff line change
Expand Up @@ -3725,10 +3725,10 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
static hssize_t
H5S__hyper_serial_size(H5S_t *space)
{
hsize_t block_count = 0; /* block counter for regular hyperslabs */
uint32_t version = UINT_MAX; /* Version number */
uint8_t enc_size; /* Encoded size of hyperslab selection info */
hssize_t ret_value = -1; /* return value */
hsize_t block_count = 0; /* block counter for regular hyperslabs */
uint32_t version = UINT_MAX; /* Version number */
uint8_t enc_size; /* Encoded size of hyperslab selection info */
hssize_t ret_value = -1; /* return value */

FUNC_ENTER_PACKAGE

Expand Down

0 comments on commit 98a9192

Please sign in to comment.