From 463ef39bc777340b731903995a2ad416ec5e0ae4 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Fri, 15 Apr 2022 15:19:21 -0500 Subject: OESS-168: Remove clang warnings. (#1376) --- src/H5FDros3.c | 4 ++-- src/H5FDros3.h | 2 +- tools/lib/h5tools.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/H5FDros3.c b/src/H5FDros3.c index e9c980b..b1bb559 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -375,7 +375,7 @@ H5FD__ros3_term(void) *------------------------------------------------------------------------- */ herr_t -H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa) +H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa) { H5P_genplist_t *plist = NULL; /* Property list pointer */ herr_t ret_value = FAIL; @@ -396,7 +396,7 @@ H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa) if (FAIL == H5FD__ros3_validate_config(fa)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid ros3 config") - ret_value = H5P_set_driver(plist, H5FD_ROS3, (void *)fa, NULL); + ret_value = H5P_set_driver(plist, H5FD_ROS3, (const void *)fa, NULL); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5FDros3.h b/src/H5FDros3.h index 4a623c4..4c9e77f 100644 --- a/src/H5FDros3.h +++ b/src/H5FDros3.h @@ -105,7 +105,7 @@ H5_DLL herr_t H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out); * * \todo Add missing documentation */ -H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa); +H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa); #ifdef __cplusplus } diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index c7dba25..8768633 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -554,7 +554,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info) #ifdef H5_HAVE_ROS3_VFD if (!vfd_info->info) H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid"); - if (H5Pset_fapl_ros3(fapl_id, (H5FD_ros3_fapl_t *)vfd_info->info) < 0) + if (H5Pset_fapl_ros3(fapl_id, (const H5FD_ros3_fapl_t *)vfd_info->info) < 0) H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed"); #else H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled"); @@ -1905,6 +1905,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t else { if ((region_space = H5Ropen_region(&tref, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { if (!h5tools_is_zero(&tref, H5Tget_size(H5T_STD_REF))) { + region_type = H5Sget_select_type(region_space); if (region_type == H5S_SEL_POINTS) render_bin_output_region_points(region_space, region_id, stream, -- cgit v0.12