From fb7cbe8acb05c9a74378efb66cd60ed3a9c6061f Mon Sep 17 00:00:00 2001 From: Frank T Willmore Date: Tue, 21 Feb 2017 15:13:03 -0600 Subject: removed erroneous casts from non-rvalue H5MM_free() calls. Replaced assignment of void return values with explicit value of NULL --- src/H5Dmpio.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index f3c8cb9..100aa97 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -2079,10 +2079,14 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i HDfprintf(debug_file, "---------------------------------------\n"); #endif - if (collective_chunk_list) - collective_chunk_list = (H5D_filtered_collective_io_info_t *) H5MM_free(collective_chunk_list); - if (has_chunk_selected_array) - has_chunk_selected_array = (hbool_t *) H5MM_free(has_chunk_selected_array); + if (collective_chunk_list){ + H5MM_free(collective_chunk_list); + collective_chunk_list = NULL; + } + if (has_chunk_selected_array){ + H5MM_free(has_chunk_selected_array); + has_chunk_selected_array = NULL; + } } /* end for */ /* Free the MPI file and memory types, if they were derived */ @@ -2964,8 +2968,10 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ #ifdef PARALLEL_COMPRESS_DEBUG HDfprintf(debug_file, "| Mod. data sent.\n|\n"); #endif - if (mod_data) - mod_data = (unsigned char *) H5MM_free(mod_data); + if (mod_data) { + H5MM_free(mod_data); + mod_data = NULL; + } if (mem_iter_init && H5S_SELECT_ITER_RELEASE(mem_iter) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release selection iterator") mem_iter_init = FALSE; -- cgit v0.12