From 4b5a19f766578655bdcff6448d37abe2dbc61da3 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 14 Dec 2022 14:26:47 -0800 Subject: [PATCH 1/6] Adds 'unused' hints for MDS io_info parameters --- src/H5Dchunk.c | 10 +++++++--- src/H5Defl.c | 4 ++-- src/H5Dvirtual.c | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index e90fb327a6a..24357740c2f 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2466,7 +2466,11 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info FUNC_ENTER_PACKAGE /* Sanity check */ +#ifdef H5_HAVE_PARALLEL HDassert(io_info); +#else + (void)io_info; +#endif HDassert(dset_info); dataset = dset_info->dset; HDassert(dataset); @@ -4266,7 +4270,7 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size) *------------------------------------------------------------------------- */ static void * -H5D__chunk_lock(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info, H5D_chunk_ud_t *udata, +H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk) { const H5D_t *dset; /* Convenience pointer to the dataset */ @@ -4674,7 +4678,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_inf *------------------------------------------------------------------------- */ static herr_t -H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info, +H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk, uint32_t naccessed) { const H5O_layout_t *layout; /* Dataset layout */ @@ -7453,7 +7457,7 @@ H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size *------------------------------------------------------------------------- */ static ssize_t -H5D__nonexistent_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info, +H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) diff --git a/src/H5Defl.c b/src/H5Defl.c index 7966c5e3659..901e388689c 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -441,7 +441,7 @@ H5D__efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata) *------------------------------------------------------------------------- */ static ssize_t -H5D__efl_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, +H5D__efl_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) { @@ -522,7 +522,7 @@ H5D__efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata) *------------------------------------------------------------------------- */ static ssize_t -H5D__efl_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, +H5D__efl_writevv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) { diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index ee16a178d1b..c40642fad43 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -2785,7 +2785,7 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset *------------------------------------------------------------------------- */ static herr_t -H5D__virtual_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) +H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info_t *dset_info) { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */ @@ -2988,7 +2988,7 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse *------------------------------------------------------------------------- */ static herr_t -H5D__virtual_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) +H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info_t *dset_info) { H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */ hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */ From 9739d6525359f1495ff537cf3946a47f37c2990e Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 22:29:41 +0000 Subject: [PATCH 2/6] Committing clang-format changes --- src/H5Dchunk.c | 15 ++++++++------- src/H5Defl.c | 12 ++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 24357740c2f..610a7999363 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2469,7 +2469,8 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info #ifdef H5_HAVE_PARALLEL HDassert(io_info); #else - (void)io_info; + (void) + io_info; #endif HDassert(dset_info); dataset = dset_info->dset; @@ -4270,8 +4271,8 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size) *------------------------------------------------------------------------- */ static void * -H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, H5D_chunk_ud_t *udata, - hbool_t relax, hbool_t prev_unfilt_chunk) +H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, + H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk) { const H5D_t *dset; /* Convenience pointer to the dataset */ H5O_pline_t *pline; /* I/O pipeline info - always equal to the pline passed to H5D__chunk_mem_alloc */ @@ -7457,10 +7458,10 @@ H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size *------------------------------------------------------------------------- */ static ssize_t -H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, - size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], - hsize_t chunk_off_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, - size_t mem_len_arr[], hsize_t mem_off_arr[]) +H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, + const H5D_dset_io_info_t *dset_info, size_t chunk_max_nseq, size_t *chunk_curr_seq, + size_t chunk_len_arr[], hsize_t chunk_off_arr[], size_t mem_max_nseq, + size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) { H5D_chunk_readvv_ud_t udata; /* User data for H5VM_opvv() operator */ ssize_t ret_value = -1; /* Return value */ diff --git a/src/H5Defl.c b/src/H5Defl.c index 901e388689c..faa5e4def18 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -441,9 +441,9 @@ H5D__efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata) *------------------------------------------------------------------------- */ static ssize_t -H5D__efl_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, - size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, - size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) +H5D__efl_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, + size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[], + size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) { H5D_efl_readvv_ud_t udata; /* User data for H5VM_opvv() operator */ ssize_t ret_value = -1; /* Return value (Total size of sequence in bytes) */ @@ -522,9 +522,9 @@ H5D__efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata) *------------------------------------------------------------------------- */ static ssize_t -H5D__efl_writevv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, - size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[], size_t mem_max_nseq, - size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) +H5D__efl_writevv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_dset_io_info_t *dset_info, + size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[], + size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[]) { H5D_efl_writevv_ud_t udata; /* User data for H5VM_opvv() operator */ ssize_t ret_value = -1; /* Return value (Total size of sequence in bytes) */ From 1e5878071a4478082727f8888ef465f285520b83 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 14 Dec 2022 14:38:13 -0800 Subject: [PATCH 3/6] Fix issue with formatter --- src/H5Dchunk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 610a7999363..fb2a0fdff45 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2469,8 +2469,9 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info #ifdef H5_HAVE_PARALLEL HDassert(io_info); #else - (void) - io_info; + /* clang-format off */ + (void)io_info; + /* clang-format on */ #endif HDassert(dset_info); dataset = dset_info->dset; From 445e6337c82a5f5a68b8c59e6cc7089562cd3d18 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 22:40:03 +0000 Subject: [PATCH 4/6] Committing clang-format changes --- src/H5Dchunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index fb2a0fdff45..c27dc9122ff 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2469,7 +2469,7 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info #ifdef H5_HAVE_PARALLEL HDassert(io_info); #else - /* clang-format off */ + /* clang-format off */ (void)io_info; /* clang-format on */ #endif From 2f1a356205777254926a7b85abb5fee44de43199 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 14 Dec 2022 14:50:37 -0800 Subject: [PATCH 5/6] Final fix for formatter --- src/H5Dchunk.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index fb2a0fdff45..e8a3adb14db 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2456,7 +2456,7 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) *------------------------------------------------------------------------- */ htri_t -H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, haddr_t caddr, +H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dset_io_info_t *dset_info, haddr_t caddr, hbool_t write_op) { const H5D_t *dataset = NULL; /* Local pointer to dataset info */ @@ -2466,13 +2466,6 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info FUNC_ENTER_PACKAGE /* Sanity check */ -#ifdef H5_HAVE_PARALLEL - HDassert(io_info); -#else - /* clang-format off */ - (void)io_info; - /* clang-format on */ -#endif HDassert(dset_info); dataset = dset_info->dset; HDassert(dataset); From eb6fd28f2506628431de332da8f4abbf26e63842 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Dec 2022 22:53:03 +0000 Subject: [PATCH 6/6] Committing clang-format changes --- src/H5Dchunk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index e8a3adb14db..40f8359f2cf 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2456,8 +2456,8 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) *------------------------------------------------------------------------- */ htri_t -H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dset_io_info_t *dset_info, haddr_t caddr, - hbool_t write_op) +H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dset_io_info_t *dset_info, + haddr_t caddr, hbool_t write_op) { const H5D_t *dataset = NULL; /* Local pointer to dataset info */ hbool_t has_filters = FALSE; /* Whether there are filters on the chunk or not */