diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2022-04-25 17:16:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 17:16:18 (GMT) |
commit | 2b323159a7e6be0cfa7bd996de945e2d44fc721d (patch) | |
tree | 20d4ff81fbff743f04503178c303d7189c1f08e5 /src/H5Dcontig.c | |
parent | c8b87fa3200228b8689f77d325646d6f77502cfa (diff) | |
download | hdf5-2b323159a7e6be0cfa7bd996de945e2d44fc721d.zip hdf5-2b323159a7e6be0cfa7bd996de945e2d44fc721d.tar.gz hdf5-2b323159a7e6be0cfa7bd996de945e2d44fc721d.tar.bz2 |
Warnings fixes (#1680)
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r-- | src/H5Dcontig.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index e02d91a..b03ad47 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -605,23 +605,25 @@ done: static htri_t H5D__contig_may_use_select_io(const H5D_io_info_t *io_info, H5D_io_op_type_t op_type) { - const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */ - htri_t ret_value = FAIL; /* Return value */ + const H5D_t *dataset = NULL; /* Local pointer to dataset info */ + htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(io_info); - HDassert(dataset); + HDassert(io_info->dset); HDassert(op_type == H5D_IO_OP_READ || op_type == H5D_IO_OP_WRITE); + dataset = io_info->dset; + /* Don't use selection I/O if it's globally disabled, if there is a type * conversion, or if it's not a contiguous dataset, or if the sieve buffer * exists (write) or is dirty (read) */ if (!H5_use_selection_io_g || io_info->io_ops.single_read != H5D__select_read || io_info->layout_ops.readvv != H5D__contig_readvv || - (op_type == H5D_IO_OP_READ && io_info->dset->shared->cache.contig.sieve_dirty) || - (op_type == H5D_IO_OP_WRITE && io_info->dset->shared->cache.contig.sieve_buf)) + (op_type == H5D_IO_OP_READ && dataset->shared->cache.contig.sieve_dirty) || + (op_type == H5D_IO_OP_WRITE && dataset->shared->cache.contig.sieve_buf)) ret_value = FALSE; else { hbool_t page_buf_enabled; |