diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2021-06-16 20:45:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 20:45:26 (GMT) |
commit | bb7dfbebdcaf3a838d03167a309b9934b997ce92 (patch) | |
tree | abd9e0690ace1a47cc8c6a7e73c49281d38483c3 /src | |
parent | e4e9bb70db3ee275977caad4b494021af41619d7 (diff) | |
download | hdf5-bb7dfbebdcaf3a838d03167a309b9934b997ce92.zip hdf5-bb7dfbebdcaf3a838d03167a309b9934b997ce92.tar.gz hdf5-bb7dfbebdcaf3a838d03167a309b9934b997ce92.tar.bz2 |
Fix several warnings (#747)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 9 | ||||
-rw-r--r-- | src/H5CX.c | 24 | ||||
-rw-r--r-- | src/H5Dchunk.c | 5 | ||||
-rw-r--r-- | src/H5FDhdfs.c | 2 | ||||
-rw-r--r-- | src/H5FDmirror.c | 4 | ||||
-rw-r--r-- | src/H5FDros3.c | 2 |
6 files changed, 29 insertions, 17 deletions
@@ -960,12 +960,9 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) * Check only the first sizeof(lib_str) char. Assume the information * will fit within this size or enough significance. */ - HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d", H5_VERS_MAJOR, H5_VERS_MINOR, - H5_VERS_RELEASE); - if (*substr) { - HDstrncat(lib_str, "-", (size_t)1); - HDstrncat(lib_str, substr, (sizeof(lib_str) - HDstrlen(lib_str)) - 1); - } /* end if */ + HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d%s%s", H5_VERS_MAJOR, + H5_VERS_MINOR, H5_VERS_RELEASE, (*substr ? "-" : ""), substr); + if (HDstrcmp(lib_str, H5_lib_vers_info_g) != 0) { HDfputs("Warning! Library version information error.\n" "The HDF5 library version information are not " @@ -1768,7 +1768,8 @@ H5CX_get_ring(void) hbool_t H5CX_get_coll_metadata_read(void) { - H5CX_node_t **head = NULL; /* Pointer to head of API context list */ + H5CX_node_t **head = NULL; /* Pointer to head of API context list */ + hbool_t coll_md_read = FALSE; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1776,7 +1777,10 @@ H5CX_get_coll_metadata_read(void) head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */ HDassert(head && *head); - FUNC_LEAVE_NOAPI((*head)->ctx.coll_metadata_read) + /* Set return value */ + coll_md_read = (*head)->ctx.coll_metadata_read; + + FUNC_LEAVE_NOAPI(coll_md_read) } /* end H5CX_get_coll_metadata_read() */ /*------------------------------------------------------------------------- @@ -1830,7 +1834,8 @@ done: hbool_t H5CX_get_mpi_file_flushing(void) { - H5CX_node_t **head = NULL; /* Pointer to head of API context list */ + H5CX_node_t **head = NULL; /* Pointer to head of API context list */ + hbool_t flushing = FALSE; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1838,7 +1843,10 @@ H5CX_get_mpi_file_flushing(void) head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */ HDassert(head && *head); - FUNC_LEAVE_NOAPI((*head)->ctx.mpi_file_flushing) + /* Set return value */ + flushing = (*head)->ctx.mpi_file_flushing; + + FUNC_LEAVE_NOAPI(flushing) } /* end H5CX_get_mpi_file_flushing() */ /*------------------------------------------------------------------------- @@ -1857,7 +1865,8 @@ H5CX_get_mpi_file_flushing(void) hbool_t H5CX_get_mpio_rank0_bcast(void) { - H5CX_node_t **head = NULL; /* Pointer to head of API context list */ + H5CX_node_t **head = NULL; /* Pointer to head of API context list */ + hbool_t do_rank0_bcast = FALSE; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1865,7 +1874,10 @@ H5CX_get_mpio_rank0_bcast(void) head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */ HDassert(head && *head); - FUNC_LEAVE_NOAPI((*head)->ctx.rank0_bcast) + /* Set return value */ + do_rank0_bcast = (*head)->ctx.rank0_bcast; + + FUNC_LEAVE_NOAPI(do_rank0_bcast) } /* end H5CX_get_mpio_rank0_bcast() */ #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 67ac99b..ccae784 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -4989,7 +4989,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_info_t *chunk_info, * order of offset in the file. */ if (need_addr_sort) - HDqsort(chunk_disp_array, blocks, sizeof(MPI_Aint), H5D__chunk_cmp_addr); + HDqsort(chunk_disp_array, (size_t)blocks, sizeof(MPI_Aint), H5D__chunk_cmp_addr); /* MSC - should use this if MPI_type_create_hindexed block is working: * mpi_code = MPI_Type_create_hindexed_block(blocks, block_len, chunk_disp_array, MPI_BYTE, @@ -7478,14 +7478,13 @@ H5D__chunk_iter_cb(const H5D_chunk_rec_t *chunk_rec, void *udata) const H5D_chunk_iter_ud_t *data = (H5D_chunk_iter_ud_t *)udata; int ret_value = H5_ITER_CONT; - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR /* Check for callback failure and pass along return value */ if ((ret_value = (data->op)(chunk_rec->scaled, chunk_rec->filter_mask, chunk_rec->chunk_addr, chunk_rec->nbytes, data->op_data)) < 0) HERROR(H5E_DATASET, H5E_CANTNEXT, "iteration operator failed"); -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_iter_cb */ diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 5cd4a65..4712a8e 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -20,8 +20,10 @@ * File System (HDFS). */ +#ifdef H5_HAVE_LIBHDFS /* This source code file is part of the H5FD driver module */ #include "H5FDdrvr_module.h" +#endif #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index 00b5cd0..5711777 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -15,12 +15,12 @@ * a remote host. */ -#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */ - #include "H5private.h" /* Generic Functions */ #ifdef H5_HAVE_MIRROR_VFD +#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */ + #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ diff --git a/src/H5FDros3.c b/src/H5FDros3.c index 6e116ee..c0361f9 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -22,8 +22,10 @@ * Relies on "s3comms" utility layer to implement the AWS REST API. */ +#ifdef H5_HAVE_ROS3_VFD /* This source code file is part of the H5FD driver module */ #include "H5FDdrvr_module.h" +#endif #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ |