summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-07-22 13:13:14 (GMT)
committerGitHub <noreply@github.com>2021-07-22 13:13:14 (GMT)
commit06de43332d80229dbe5f5a1ac4addf3fbc8325f5 (patch)
tree9808c8fe185c9ba90e9650db400e3669eeda6240 /src
parent96b6872a1e7deac7673d31697dafa1f44763ede4 (diff)
downloadhdf5-06de43332d80229dbe5f5a1ac4addf3fbc8325f5.zip
hdf5-06de43332d80229dbe5f5a1ac4addf3fbc8325f5.tar.gz
hdf5-06de43332d80229dbe5f5a1ac4addf3fbc8325f5.tar.bz2
Fixes a couple of warnings: (#849)
- warn_unused_result warnings from h5jamgentest and j5stat_gentest that were triggered by write(2) calls where we didn't check the return value - A missing callback in the NULL VOL connector - A possibly uninitialized property list pointer
Diffstat (limited to 'src')
-rw-r--r--src/H5Pdxpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 046b046..5f83a1d 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -2281,7 +2281,7 @@ herr_t
H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper_t op, const hsize_t start[],
const hsize_t stride[], const hsize_t count[], const hsize_t block[])
{
- H5P_genplist_t *plist; /* Property list pointer */
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
H5S_t * space; /* Dataspace to hold selection */
hbool_t space_created = FALSE; /* Whether a new dataspace has been created */
hbool_t reset_prop_on_error = FALSE; /* Whether to reset the property on failure */
@@ -2371,7 +2371,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper
done:
/* Cleanup on failure */
if (ret_value < 0) {
- if (reset_prop_on_error && H5P_poke(plist, H5D_XFER_DSET_IO_SEL_NAME, &space) < 0)
+ if (reset_prop_on_error && plist && H5P_poke(plist, H5D_XFER_DSET_IO_SEL_NAME, &space) < 0)
HDONE_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "error setting dataset I/O selection")
if (space_created && H5S_close(space) < 0)
HDONE_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release dataspace")