summaryrefslogtreecommitdiffstats
path: root/src/H5Dcontig.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-11-20 14:34:50 (GMT)
committerGitHub <noreply@github.com>2021-11-20 14:34:50 (GMT)
commit3a2b3bb0355424ee34b1e4ba9a76424470911676 (patch)
treec806c961a89a723d6de8fc4bb442e5cdd2f031ce /src/H5Dcontig.c
parent49f7e00ebeb343ea3716836c3fe6c1f0f4568335 (diff)
downloadhdf5-3a2b3bb0355424ee34b1e4ba9a76424470911676.zip
hdf5-3a2b3bb0355424ee34b1e4ba9a76424470911676.tar.gz
hdf5-3a2b3bb0355424ee34b1e4ba9a76424470911676.tar.bz2
Stop lying about H5S_t const-ness (#1209)
Hyperslabs can be reworked inside several H5S callbacks, making H5S_t non-const in some places where it is marked const. This change switches these incorrectly const H5S_t pointer parameters and variables to non-const where appropriate.
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r--src/H5Dcontig.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 4dc6f72..2ace14b 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -91,8 +91,7 @@ typedef struct H5D_contig_writevv_ud_t {
static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
static herr_t H5D__contig_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id);
static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
- hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
- H5D_chunk_map_t *cm);
+ hsize_t nelmts, H5S_t *file_space, H5S_t *mem_space, H5D_chunk_map_t *cm);
static ssize_t H5D__contig_readvv(const H5D_io_info_t *io_info, size_t dset_max_nseq, size_t *dset_curr_seq,
size_t dset_len_arr[], hsize_t dset_offset_arr[], size_t mem_max_nseq,
size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
@@ -109,13 +108,24 @@ static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size
/*********************/
/* Contiguous storage layout I/O ops */
-const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {
- {H5D__contig_construct, H5D__contig_init, H5D__contig_is_space_alloc, H5D__contig_is_data_cached,
- H5D__contig_io_init, H5D__contig_read, H5D__contig_write,
+const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
+ H5D__contig_construct, /* construct */
+ H5D__contig_init, /* init */
+ H5D__contig_is_space_alloc, /* is_space_alloc */
+ H5D__contig_is_data_cached, /* is_data_cached */
+ H5D__contig_io_init, /* io_init */
+ H5D__contig_read, /* ser_read */
+ H5D__contig_write, /* ser_write */
#ifdef H5_HAVE_PARALLEL
- H5D__contig_collective_read, H5D__contig_collective_write,
-#endif /* H5_HAVE_PARALLEL */
- H5D__contig_readvv, H5D__contig_writevv, H5D__contig_flush, NULL, NULL}};
+ H5D__contig_collective_read, /* par_read */
+ H5D__contig_collective_write, /* par_write */
+#endif
+ H5D__contig_readvv, /* readvv */
+ H5D__contig_writevv, /* writevv */
+ H5D__contig_flush, /* flush */
+ NULL, /* io_term */
+ NULL /* dest */
+}};
/*******************/
/* Local Variables */
@@ -550,8 +560,8 @@ H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
*/
static herr_t
H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNUSED *type_info,
- hsize_t H5_ATTR_UNUSED nelmts, const H5S_t H5_ATTR_UNUSED *file_space,
- const H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
+ hsize_t H5_ATTR_UNUSED nelmts, H5S_t H5_ATTR_UNUSED *file_space,
+ H5S_t H5_ATTR_UNUSED *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *cm)
{
FUNC_ENTER_STATIC_NOERR
@@ -574,8 +584,8 @@ H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
herr_t ret_value = SUCCEED; /*return value */
@@ -609,8 +619,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts,
- const H5S_t *file_space, const H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
+H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, H5S_t *file_space,
+ H5S_t *mem_space, H5D_chunk_map_t H5_ATTR_UNUSED *fm)
{
herr_t ret_value = SUCCEED; /*return value */