summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Distore.c7
-rw-r--r--src/H5FDmpio.c13
-rw-r--r--src/H5Fistore.c7
-rw-r--r--src/H5T.c2
4 files changed, 14 insertions, 15 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 913bdf9..a44ce5a 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -2396,7 +2396,8 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
/* Check if fill values should be written to blocks */
if(fill_time != H5D_FILL_TIME_NEVER) {
/* Allocate chunk buffer for processes to use when writing fill values */
- if (NULL==(chunk = H5MM_malloc(chunk_size)))
+ H5_CHECK_OVERFLOW(chunk_size,hsize_t,size_t);
+ if (NULL==(chunk = H5MM_malloc((size_t)chunk_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for chunk");
/* Fill the chunk with the proper values */
@@ -2405,12 +2406,12 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* Replicate the fill value throughout the chunk.
*/
assert(0==chunk_size % fill.size);
- H5V_array_fill(chunk, fill.buf, fill.size, chunk_size/fill.size);
+ H5V_array_fill(chunk, fill.buf, fill.size, (size_t)chunk_size/fill.size);
} else {
/*
* No fill value was specified, assume all zeros.
*/
- HDmemset (chunk, 0, chunk_size);
+ HDmemset (chunk, 0, (size_t)chunk_size);
} /* end else */
} /* end if */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 064341b..842c6e4 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -643,6 +643,9 @@ H5FD_mpio_wait_for_left_neighbor(H5FD_t *_file)
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
+ /* Portably initialize MPI status variable */
+ HDmemset(&rcvstat,0,sizeof(MPI_Status));
+
/* p0 has no left neighbor; all other procs wait for msg */
if (file->mpi_rank != 0) {
if (MPI_SUCCESS!= MPI_Recv( &msgbuf, 1, MPI_CHAR, file->mpi_rank-1, MPI_ANY_TAG, file->comm, &rcvstat ))
@@ -781,7 +784,7 @@ H5FD_mpio_fapl_get(H5FD_t *_file)
*/
static H5FD_t *
H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr/*unused*/)
+ haddr_t UNUSED maxaddr)
{
H5FD_mpio_t *file=NULL;
MPI_File fh;
@@ -987,18 +990,12 @@ H5FD_mpio_close(H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mpio_query(const H5FD_t *_file, unsigned long *flags /* out */)
+H5FD_mpio_query(const H5FD_t UNUSED *_file, unsigned long *flags /* out */)
{
-#ifndef NDEBUG
- const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
-#endif /* NDEBUG */
herr_t ret_value=SUCCEED;
FUNC_ENTER_NOAPI(H5FD_mpio_query, FAIL);
- assert(file);
- assert(H5FD_MPIO==file->pub.driver_id);
-
/* Set the VFL feature flags that this driver supports */
if(flags) {
*flags=0;
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 913bdf9..a44ce5a 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -2396,7 +2396,8 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
/* Check if fill values should be written to blocks */
if(fill_time != H5D_FILL_TIME_NEVER) {
/* Allocate chunk buffer for processes to use when writing fill values */
- if (NULL==(chunk = H5MM_malloc(chunk_size)))
+ H5_CHECK_OVERFLOW(chunk_size,hsize_t,size_t);
+ if (NULL==(chunk = H5MM_malloc((size_t)chunk_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for chunk");
/* Fill the chunk with the proper values */
@@ -2405,12 +2406,12 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* Replicate the fill value throughout the chunk.
*/
assert(0==chunk_size % fill.size);
- H5V_array_fill(chunk, fill.buf, fill.size, chunk_size/fill.size);
+ H5V_array_fill(chunk, fill.buf, fill.size, (size_t)chunk_size/fill.size);
} else {
/*
* No fill value was specified, assume all zeros.
*/
- HDmemset (chunk, 0, chunk_size);
+ HDmemset (chunk, 0, (size_t)chunk_size);
} /* end else */
} /* end if */
diff --git a/src/H5T.c b/src/H5T.c
index 12832e5..4a3c533 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -7921,7 +7921,7 @@ done:
*/
hid_t
H5Tarray_create(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
- const int UNUSED *perm/* ndims */)
+ const int perm[/* ndims */])
{
H5T_t *base = NULL; /* base data type */
H5T_t *dt = NULL; /* new array data type */