diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2022-05-08 09:38:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 09:38:32 (GMT) |
commit | ea27e1380cf02e5f92d61cf9509596914c14e4df (patch) | |
tree | e753ad8ab4717fd9c1359b7a65dad274c599ca1c /src/H5Pfapl.c | |
parent | c0f314ad03f5ef0b4366ee625c83a7955a9ea87f (diff) | |
download | hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.zip hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.tar.gz hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.tar.bz2 |
Fixes for various warnings/alignment with develop branch (#1755)
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r-- | src/H5Pfapl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index e0cbe62..5a5c8c9 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -1187,12 +1187,14 @@ H5P__file_driver_free(void *value) /* Allow driver to free info or do it ourselves */ if (driver->fapl_free) { - if ((driver->fapl_free)((void *)info->driver_info) < 0) /* Casting away const OK -QAK */ + /* Free the const pointer */ + /* Cast through uintptr_t to de-const memory */ + if ((driver->fapl_free)((void *)(uintptr_t)info->driver_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "driver info free request failed") } /* end if */ else - H5MM_xfree((void *)info->driver_info); /* Casting away const OK -QAK */ - } /* end if */ + H5MM_xfree_const(info->driver_info); + } /* end if */ /* Decrement reference count for driver */ if (H5I_dec_ref(info->driver_id) < 0) |