1
1

Miscellaneous compiler warnings fixes

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Jeff Squyres 2018-03-23 11:45:30 -07:00
родитель f66ac43fbc
Коммит c3adcb05eb
7 изменённых файлов: 38 добавлений и 23 удалений

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

@ -9,7 +9,7 @@
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2018 Cisco Systems, Inc. All rights reserved
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -108,8 +108,12 @@ ompi_datatype_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** newTy
the top level (specifically, MPI_TYPE_DUP). */
new_ompi_datatype->d_keyhash = NULL;
new_ompi_datatype->args = NULL;
snprintf (new_ompi_datatype->name, MPI_MAX_OBJECT_NAME, "Dup %s",
oldType->name);
char *new_name;
asprintf(&new_name, "Dup %s", oldType->name);
strncpy(new_ompi_datatype->name, new_name, MPI_MAX_OBJECT_NAME - 1);
new_ompi_datatype->name[MPI_MAX_OBJECT_NAME - 1] = '\0';
free(new_name);
return OMPI_SUCCESS;
}

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

@ -2,7 +2,7 @@
/*
* Copyright (c) 2004-2015 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016 Research Organization for Information Science
@ -140,10 +140,15 @@ static int mca_pml_v_component_close(void)
ompi_pml_v_output_close ();
/* Mark that we have changed something */
snprintf(mca_pml_base_selected_component.pmlm_version.mca_component_name,
MCA_BASE_MAX_TYPE_NAME_LEN, "%s]v%s",
char *new_name;
asprintf(&new_name, "%s]v%s",
mca_pml_v.host_pml_component.pmlm_version.mca_component_name,
mca_vprotocol_component.pmlm_version.mca_component_name);
size_t len = sizeof(mca_pml_base_selected_component.pmlm_version.mca_component_name);
strncpy(mca_pml_base_selected_component.pmlm_version.mca_component_name,
new_name, len - 1);
mca_pml_base_selected_component.pmlm_version.mca_component_name[len - 1] = '\0';
free(new_name);
/* Replace finalize */
mca_pml_base_selected_component.pmlm_finalize =

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

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
@ -107,8 +107,12 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
*/
datatype->super.flags |= OMPI_DATATYPE_FLAG_PREDEFINED;
/* Mark the datatype as a special F90 convenience type */
snprintf(datatype->name, MPI_MAX_OBJECT_NAME, "COMBINER %s",
(*newtype)->name);
char *new_name;
asprintf(&new_name, "COMBINER %s", (*newtype)->name);
size_t max_len = MPI_MAX_OBJECT_NAME;
strncpy(datatype->name, new_name, max_len - 1);
datatype->name[max_len - 1] = '\0';
free(new_name);
a_i[0] = &p;
a_i[1] = &r;

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

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
@ -103,8 +103,12 @@ int MPI_Type_create_f90_integer(int r, MPI_Datatype *newtype)
*/
datatype->super.flags |= OMPI_DATATYPE_FLAG_PREDEFINED;
/* Mark the datatype as a special F90 convenience type */
snprintf(datatype->name, MPI_MAX_OBJECT_NAME, "COMBINER %s",
(*newtype)->name);
char *new_name;
asprintf(&new_name, "COMBINER %s", (*newtype)->name);
size_t max_len = MPI_MAX_OBJECT_NAME;
strncpy(datatype->name, new_name, max_len - 1);
datatype->name[max_len - 1] = '\0';
free(new_name);
a_i[0] = &r;
ompi_datatype_set_args( datatype, 1, a_i, 0, NULL, 0, NULL, MPI_COMBINER_F90_INTEGER );

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

@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
@ -107,8 +107,12 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
*/
datatype->super.flags |= OMPI_DATATYPE_FLAG_PREDEFINED;
/* Mark the datatype as a special F90 convenience type */
snprintf(datatype->name, MPI_MAX_OBJECT_NAME, "COMBINER %s",
(*newtype)->name);
char *new_name;
asprintf(&new_name, "COMBINER %s", (*newtype)->name);
size_t max_len = MPI_MAX_OBJECT_NAME;
strncpy(datatype->name, new_name, max_len - 1);
datatype->name[max_len - 1] = '\0';
free(new_name);
ompi_datatype_set_args( datatype, 2, a_i, 0, NULL, 0, NULL, MPI_COMBINER_F90_REAL );

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

@ -15,7 +15,7 @@
* Copyright (c) 2007 Mellanox Technologies. All rights reserved.
* Copyright (c) 2009 IBM Corporation. All rights reserved.
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2015-2018 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
@ -107,7 +107,6 @@ int mca_rcache_base_vma_tree_iterate (mca_rcache_base_vma_module_t *vma_module,
{
mca_rcache_base_vma_tree_iterate_helper_args_t args = {.callback_fn = callback_fn, .ctx = ctx};
uintptr_t bound = (uintptr_t) base + size;
int rc;
return opal_interval_tree_traverse (&vma_module->tree, (uint64_t) (intptr_t) base, bound, partial_ok,
mca_rcache_base_vma_tree_iterate_helper, &args);

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

@ -2,7 +2,7 @@
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
*
* Copyright (c) 2014-2017 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2014-2018 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
@ -416,13 +416,8 @@ void oshmem_info_do_config(bool want_all)
MPI_MAX_INFO_VAL);
opal_info_out_int("MPI_MAX_PORT_NAME", "options:mpi-max-port-name",
MPI_MAX_PORT_NAME);
#if OMPI_PROVIDE_MPI_FILE_INTERFACE
opal_info_out_int("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string",
MPI_MAX_DATAREP_STRING);
#else
opal_info_out("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string",
"IO interface not provided");
#endif
/* This block displays all the options with which the current
* installation of oshmem was configured. */