From cef3618ec87dcd6cda4218e6643fd2b926ae6578 Mon Sep 17 00:00:00 2001 From: Glenn Song Date: Thu, 7 Mar 2024 18:52:41 -0600 Subject: [PATCH 1/4] Initialize selection type in both if/else sections --- src/H5Dchunk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index c8bad760e71..a91dc5e6fc9 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1205,6 +1205,10 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Initialize skip list for chunk selections */ fm->use_single = true; + /* Initialize selection type in memory and file */ + fm->msel_type = H5S_SEL_NONE; + fm->fsel_type = H5S_SEL_NONE; + /* Initialize single chunk dataspace */ if (NULL == dataset->shared->cache.chunk.single_space) { /* Make a copy of the dataspace for the dataset */ From 18d4f410e68c95c0b16a340ea6cf4423e7dc7d47 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:58:49 +0000 Subject: [PATCH 2/4] 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 a91dc5e6fc9..da81a511b0c 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1206,8 +1206,8 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) fm->use_single = true; /* Initialize selection type in memory and file */ - fm->msel_type = H5S_SEL_NONE; - fm->fsel_type = H5S_SEL_NONE; + fm->msel_type = H5S_SEL_NONE; + fm->fsel_type = H5S_SEL_NONE; /* Initialize single chunk dataspace */ if (NULL == dataset->shared->cache.chunk.single_space) { From b2396638c445f9ac04dfb9a1892861749ff045b6 Mon Sep 17 00:00:00 2001 From: Glenn Song Date: Tue, 12 Mar 2024 09:47:13 -0500 Subject: [PATCH 3/4] Move where selection values are initialized --- src/H5Dchunk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index da81a511b0c..9683bf2c9a2 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1061,6 +1061,10 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) fm->single_space = NULL; fm->single_piece_info = NULL; + /* Initialize selection type in memory and file */ + fm->msel_type = H5S_SEL_ERROR; + fm->fsel_type = H5S_SEL_ERROR; + /* Check if the memory space is scalar & make equivalent memory space */ if ((sm_ndims = H5S_GET_EXTENT_NDIMS(dinfo->mem_space)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number"); @@ -1205,10 +1209,6 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Initialize skip list for chunk selections */ fm->use_single = true; - /* Initialize selection type in memory and file */ - fm->msel_type = H5S_SEL_NONE; - fm->fsel_type = H5S_SEL_NONE; - /* Initialize single chunk dataspace */ if (NULL == dataset->shared->cache.chunk.single_space) { /* Make a copy of the dataspace for the dataset */ From d2a1ec9f7d78b9e01a5beaf77608ab373bea9a5e Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:48:47 +0000 Subject: [PATCH 4/4] 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 9683bf2c9a2..67689b42b20 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1062,8 +1062,8 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) fm->single_piece_info = NULL; /* Initialize selection type in memory and file */ - fm->msel_type = H5S_SEL_ERROR; - fm->fsel_type = H5S_SEL_ERROR; + fm->msel_type = H5S_SEL_ERROR; + fm->fsel_type = H5S_SEL_ERROR; /* Check if the memory space is scalar & make equivalent memory space */ if ((sm_ndims = H5S_GET_EXTENT_NDIMS(dinfo->mem_space)) < 0)