summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank T Willmore <Frank.Willmore@hdfgroup.org>2017-02-21 21:13:03 (GMT)
committerFrank T Willmore <Frank.Willmore@hdfgroup.org>2017-02-21 21:13:03 (GMT)
commitfb7cbe8acb05c9a74378efb66cd60ed3a9c6061f (patch)
tree4777cd13a47ce3bc7a043090598c0682b9372ee7
parent973594f6ae445978697eb2333d14009ddb2ab103 (diff)
downloadhdf5-fb7cbe8acb05c9a74378efb66cd60ed3a9c6061f.zip
hdf5-fb7cbe8acb05c9a74378efb66cd60ed3a9c6061f.tar.gz
hdf5-fb7cbe8acb05c9a74378efb66cd60ed3a9c6061f.tar.bz2
removed erroneous casts from non-rvalue H5MM_free() calls. Replaced assignment of void return values with explicit value of NULL
-rw-r--r--src/H5Dmpio.c18
1 files 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;