diff --git a/ompi/debuggers/ompi_msgq_dll.c b/ompi/debuggers/ompi_msgq_dll.c index cf081fdb66..f5afab5d2e 100644 --- a/ompi/debuggers/ompi_msgq_dll.c +++ b/ompi/debuggers/ompi_msgq_dll.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2007-2018 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2004-2010 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. @@ -1157,8 +1157,18 @@ static int fetch_request( mqs_process *proc, mpi_process_info *p_info, mqs_fetch_data( proc, ompi_datatype + i_info->ompi_datatype_t.offset.name, 64, data_name ); if( '\0' != data_name[0] ) { - snprintf( (char*)res->extra_text[1], 64, "Data: %d * %s", - (int)res->desired_length, data_name ); + // res->extra_text[x] is only 64 chars long -- same as + // data_name. If you try to snprintf it into + // res->extra_text with additional text, some compilers + // will warn that we might truncate the string (because it + // can see the static char array lengths). So just put + // data_name in res->extra_text[2] (vs. extra_text[1]), + // where it is guaranteed to fit. + data_name[4] = '\0'; + snprintf( (char*)res->extra_text[1], 64, "Data: %d", + (int)res->desired_length); + snprintf( (char*)res->extra_text[2], 64, "%s", + data_name ); } /* And now compute the real length as specified by the user */ res->desired_length *= diff --git a/opal/mca/btl/ofi/btl_ofi_frag.c b/opal/mca/btl/ofi/btl_ofi_frag.c index 1fd5c7b3a8..0f6066274c 100644 --- a/opal/mca/btl/ofi/btl_ofi_frag.c +++ b/opal/mca/btl/ofi/btl_ofi_frag.c @@ -64,7 +64,7 @@ mca_btl_ofi_frag_completion_t *mca_btl_ofi_frag_completion_alloc mca_btl_base_descriptor_t *mca_btl_ofi_alloc( mca_btl_base_module_t *btl, mca_btl_base_endpoint_t *endpoint, - uint64_t order, size_t size, uint32_t flags) + uint8_t order, size_t size, uint32_t flags) { mca_btl_ofi_module_t *ofi_btl = (mca_btl_ofi_module_t*) btl; mca_btl_ofi_base_frag_t *frag = NULL; diff --git a/opal/mca/btl/ofi/btl_ofi_frag.h b/opal/mca/btl/ofi/btl_ofi_frag.h index bc3892d5f8..7e87a895b8 100644 --- a/opal/mca/btl/ofi/btl_ofi_frag.h +++ b/opal/mca/btl/ofi/btl_ofi_frag.h @@ -32,7 +32,7 @@ mca_btl_base_descriptor_t *mca_btl_ofi_alloc( mca_btl_base_module_t *btl, mca_btl_base_endpoint_t *endpoint, - uint64_t order, size_t size, uint32_t flags); + uint8_t order, size_t size, uint32_t flags); int mca_btl_ofi_free (mca_btl_base_module_t *btl, mca_btl_base_descriptor_t *des); diff --git a/opal/mca/btl/ofi/btl_ofi_module.c b/opal/mca/btl/ofi/btl_ofi_module.c index f9a3ae17b5..f9ae6421a5 100644 --- a/opal/mca/btl/ofi/btl_ofi_module.c +++ b/opal/mca/btl/ofi/btl_ofi_module.c @@ -62,7 +62,7 @@ static int mca_btl_ofi_add_procs (mca_btl_base_module_t *btl, } else { /* We don't have this endpoint yet, create one */ peers[i] = mca_btl_ofi_endpoint_create (proc, ofi_btl->ofi_endpoint); - BTL_VERBOSE(("creating peer %p", peers[i])); + BTL_VERBOSE(("creating peer %p", (void*) peers[i])); if (OPAL_UNLIKELY(NULL == peers[i])) { return OPAL_ERR_OUT_OF_RESOURCE; diff --git a/opal/mca/patcher/base/patcher_base_patch.c b/opal/mca/patcher/base/patcher_base_patch.c index ef3cb6024c..011b7a273f 100644 --- a/opal/mca/patcher/base/patcher_base_patch.c +++ b/opal/mca/patcher/base/patcher_base_patch.c @@ -115,7 +115,7 @@ static void flush_and_invalidate_cache (unsigned long a) "isb":: "r" (a)); #endif } -#endif // HAVE___CLEAR_CACHE +#endif // !HAVE___CLEAR_CACHE // modify protection of memory range static void ModifyMemoryProtection (uintptr_t addr, size_t length, int prot)