From 2e37f97a389a21b19c003f36041854c98930c903 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 24 Aug 2018 07:39:14 -0700 Subject: [PATCH] Miscellaneous compiler warning stomps. Signed-off-by: Jeff Squyres (cherry picked from commit fe0852bcb4d14a6aaf5a3e1021f60b5be32dd42d) --- ompi/mca/pml/ucx/pml_ucx.c | 13 +++++++------ ompi/mca/pml/ucx/pml_ucx_request.c | 2 +- ompi/mca/pml/ucx/pml_ucx_request.h | 2 +- opal/mca/btl/tcp/btl_tcp_proc.c | 2 +- opal/mca/btl/uct/btl_uct_am.c | 2 +- opal/mca/common/ucx/common_ucx.h | 2 +- orte/tools/orte-top/orte-top.c | 2 +- oshmem/runtime/oshmem_shmem_init.c | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ompi/mca/pml/ucx/pml_ucx.c b/ompi/mca/pml/ucx/pml_ucx.c index 9cf9ff98c7..1f37212c58 100644 --- a/ompi/mca/pml/ucx/pml_ucx.c +++ b/ompi/mca/pml/ucx/pml_ucx.c @@ -441,7 +441,7 @@ int mca_pml_ucx_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype, req->flags = 0; req->buffer = buf; req->count = count; - req->datatype = mca_pml_ucx_get_datatype(datatype); + req->datatype.datatype = mca_pml_ucx_get_datatype(datatype); PML_UCX_MAKE_RECV_TAG(req->tag, req->recv.tag_mask, tag, src, comm); @@ -550,10 +550,10 @@ int mca_pml_ucx_isend_init(const void *buf, size_t count, ompi_datatype_t *datat req->send.mode = mode; req->send.ep = ep; if (MCA_PML_BASE_SEND_BUFFERED == mode) { - req->ompi_datatype = datatype; + req->datatype.ompi_datatype = datatype; OBJ_RETAIN(datatype); } else { - req->datatype = mca_pml_ucx_get_datatype(datatype); + req->datatype.datatype = mca_pml_ucx_get_datatype(datatype); } *request = &req->ompi; @@ -910,8 +910,8 @@ int mca_pml_ucx_start(size_t count, ompi_request_t** requests) tmp_req = (ompi_request_t*)mca_pml_ucx_common_send(preq->send.ep, preq->buffer, preq->count, - preq->ompi_datatype, - preq->datatype, + preq->datatype.ompi_datatype, + preq->datatype.datatype, preq->tag, preq->send.mode, mca_pml_ucx_psend_completion); @@ -919,7 +919,8 @@ int mca_pml_ucx_start(size_t count, ompi_request_t** requests) PML_UCX_VERBOSE(8, "start recv request %p", (void*)preq); tmp_req = (ompi_request_t*)ucp_tag_recv_nb(ompi_pml_ucx.ucp_worker, preq->buffer, preq->count, - preq->datatype, preq->tag, + preq->datatype.datatype, + preq->tag, preq->recv.tag_mask, mca_pml_ucx_precv_completion); } diff --git a/ompi/mca/pml/ucx/pml_ucx_request.c b/ompi/mca/pml/ucx/pml_ucx_request.c index 70b379f3eb..8602386e0c 100644 --- a/ompi/mca/pml/ucx/pml_ucx_request.c +++ b/ompi/mca/pml/ucx/pml_ucx_request.c @@ -176,7 +176,7 @@ static int mca_pml_ucx_persistent_request_free(ompi_request_t **rptr) } if ((preq->flags & MCA_PML_UCX_REQUEST_FLAG_SEND) && (MCA_PML_BASE_SEND_BUFFERED == preq->send.mode)) { - OBJ_RELEASE(preq->ompi_datatype); + OBJ_RELEASE(preq->datatype.ompi_datatype); } PML_UCX_FREELIST_RETURN(&ompi_pml_ucx.persistent_reqs, &preq->ompi.super); *rptr = MPI_REQUEST_NULL; diff --git a/ompi/mca/pml/ucx/pml_ucx_request.h b/ompi/mca/pml/ucx/pml_ucx_request.h index 9166f042ae..cb53d30bce 100644 --- a/ompi/mca/pml/ucx/pml_ucx_request.h +++ b/ompi/mca/pml/ucx/pml_ucx_request.h @@ -102,7 +102,7 @@ struct pml_ucx_persistent_request { union { ucp_datatype_t datatype; ompi_datatype_t *ompi_datatype; - }; + } datatype; ucp_tag_t tag; struct { mca_pml_base_send_mode_t mode; diff --git a/opal/mca/btl/tcp/btl_tcp_proc.c b/opal/mca/btl/tcp/btl_tcp_proc.c index b7bf95c14b..28cf9a1778 100644 --- a/opal/mca/btl/tcp/btl_tcp_proc.c +++ b/opal/mca/btl/tcp/btl_tcp_proc.c @@ -413,7 +413,7 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc, { struct sockaddr_storage endpoint_addr_ss; const char *proc_hostname; - unsigned int perm_size; + unsigned int perm_size = 0; int rc, *a = NULL; size_t i, j; mca_btl_tcp_interface_t** peer_interfaces = NULL; diff --git a/opal/mca/btl/uct/btl_uct_am.c b/opal/mca/btl/uct/btl_uct_am.c index 6927f31c8c..1c36769137 100644 --- a/opal/mca/btl/uct/btl_uct_am.c +++ b/opal/mca/btl/uct/btl_uct_am.c @@ -269,7 +269,7 @@ int mca_btl_uct_sendi (mca_btl_base_module_t *btl, mca_btl_base_endpoint_t *endp /* message with header */ const size_t msg_size = total_size + 8; mca_btl_uct_am_header_t am_header; - ucs_status_t ucs_status; + ucs_status_t ucs_status = UCS_OK; uct_ep_h ep_handle; int rc; diff --git a/opal/mca/common/ucx/common_ucx.h b/opal/mca/common/ucx/common_ucx.h index 6825e4de64..4fa4b3b670 100644 --- a/opal/mca/common/ucx/common_ucx.h +++ b/opal/mca/common/ucx/common_ucx.h @@ -122,7 +122,7 @@ int opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h worker, if (OPAL_LIKELY(UCS_OK == request)) { return OPAL_SUCCESS; } else if (OPAL_UNLIKELY(UCS_PTR_IS_ERR(request))) { - MCA_COMMON_UCX_VERBOSE(1, "%s failed: %d, %s", msg ? msg : __FUNCTION__, + MCA_COMMON_UCX_VERBOSE(1, "%s failed: %d, %s", msg ? msg : __func__, UCS_PTR_STATUS(request), ucs_status_string(UCS_PTR_STATUS(request))); return OPAL_ERROR; diff --git a/orte/tools/orte-top/orte-top.c b/orte/tools/orte-top/orte-top.c index 2111146b1e..42e2f1f76f 100644 --- a/orte/tools/orte-top/orte-top.c +++ b/orte/tools/orte-top/orte-top.c @@ -765,7 +765,7 @@ static void print_ranks(opal_list_t *statlist) opal_list_item_t *item; opal_pstats_t *stats, *pstats; int32_t minrank; - char pretty_time[10]; + char pretty_time[32]; int i; /* sort the results by rank */ diff --git a/oshmem/runtime/oshmem_shmem_init.c b/oshmem/runtime/oshmem_shmem_init.c index d1a187bf4d..f111581004 100644 --- a/oshmem/runtime/oshmem_shmem_init.c +++ b/oshmem/runtime/oshmem_shmem_init.c @@ -107,7 +107,7 @@ MPI_Comm oshmem_comm_world = {0}; opal_thread_t *oshmem_mpi_main_thread = NULL; -shmem_internal_mutex_t shmem_internal_mutex_alloc = {0}; +shmem_internal_mutex_t shmem_internal_mutex_alloc = {{0}}; shmem_ctx_t oshmem_ctx_default = NULL;