1
1
A variety of small compiler warning fixes.  The 2 PMIx fixes are
already committed upstream.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Jeff Squyres 2018-09-11 12:15:27 -07:00
родитель 6363889cd0
Коммит 8f2620d3af
5 изменённых файлов: 17 добавлений и 7 удалений

Просмотреть файл

@ -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 *=

Просмотреть файл

@ -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;

Просмотреть файл

@ -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);

Просмотреть файл

@ -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;

Просмотреть файл

@ -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)