Skip to content

Commit 97c95c4

Browse files
authored
Merge pull request #3189 from jsquyres/pr/v2.1.1/compiler-warning-fixes
v2.1.1: compiler warning fixes
2 parents 719ffe2 + ff8e549 commit 97c95c4

File tree

13 files changed

+26
-72
lines changed

13 files changed

+26
-72
lines changed

ompi/mca/coll/base/coll_base_allgatherv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2015-2016 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2017 IBM Corporation. All rights reserved.
19+
* Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -603,7 +604,7 @@ ompi_coll_base_allgatherv_intra_basic_default(const void *sbuf, int scount,
603604
struct ompi_communicator_t *comm,
604605
mca_coll_base_module_t *module)
605606
{
606-
int i, size, rank, err;
607+
int size, rank, err;
607608
MPI_Aint extent, lb;
608609
char *send_buf = NULL;
609610
struct ompi_datatype_t *newtype, *send_type;

ompi/mca/coll/sync/coll_sync.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2008-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -71,7 +71,7 @@ int mca_coll_sync_gather(const void *sbuf, int scount,
7171

7272
int mca_coll_sync_gatherv(const void *sbuf, int scount,
7373
struct ompi_datatype_t *sdtype,
74-
void *rbuf, int *rcounts, int *disps,
74+
void *rbuf, const int *rcounts, const int *disps,
7575
struct ompi_datatype_t *rdtype,
7676
int root,
7777
struct ompi_communicator_t *comm,
@@ -85,7 +85,7 @@ int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
8585
mca_coll_base_module_t *module);
8686

8787
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
88-
int *rcounts,
88+
const int *rcounts,
8989
struct ompi_datatype_t *dtype,
9090
struct ompi_op_t *op,
9191
struct ompi_communicator_t *comm,
@@ -105,8 +105,8 @@ int mca_coll_sync_scatter(const void *sbuf, int scount,
105105
struct ompi_communicator_t *comm,
106106
mca_coll_base_module_t *module);
107107

108-
int mca_coll_sync_scatterv(const void *sbuf, int *scounts, int *disps,
109-
struct ompi_datatype_t *sdtype,
108+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
109+
const int *disps, struct ompi_datatype_t *sdtype,
110110
void *rbuf, int rcount,
111111
struct ompi_datatype_t *rdtype,
112112
int root,

ompi/mca/coll/sync/coll_sync_gatherv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -31,7 +31,7 @@
3131
*/
3232
int mca_coll_sync_gatherv(const void *sbuf, int scount,
3333
struct ompi_datatype_t *sdtype,
34-
void *rbuf, int *rcounts, int *disps,
34+
void *rbuf, const int *rcounts, const int *disps,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,
3737
mca_coll_base_module_t *module)

ompi/mca/coll/sync/coll_sync_reduce_scatter.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
13-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1414
* $COPYRIGHT$
1515
*
1616
* Additional copyrights may follow
@@ -30,7 +30,8 @@
3030
* Accepts: - same as MPI_Reduce_scatter()
3131
* Returns: - MPI_SUCCESS or error code
3232
*/
33-
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf, int *rcounts,
33+
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
34+
const int *rcounts,
3435
struct ompi_datatype_t *dtype,
3536
struct ompi_op_t *op,
3637
struct ompi_communicator_t *comm,

ompi/mca/coll/sync/coll_sync_scatterv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -29,8 +29,8 @@
2929
* Accepts: - same arguments as MPI_Scatterv()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_scatterv(const void *sbuf, int *scounts,
33-
int *disps, struct ompi_datatype_t *sdtype,
32+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
33+
const int *disps, struct ompi_datatype_t *sdtype,
3434
void *rbuf, int rcount,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,

opal/class/opal_graph.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ void opal_graph_remove_edge (opal_graph_t *graph, opal_graph_edge_t *edge)
337337
void opal_graph_remove_vertex(opal_graph_t *graph, opal_graph_vertex_t *vertex)
338338
{
339339
opal_adjacency_list_t *adj_list;
340-
opal_graph_edge_t *edge;
341340

342341
/* do not need to remove all the edges of this vertex and destruct them as
343342
* they will be released in the destructor for adj_list */

opal/datatype/opal_datatype_pack.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2006 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
14-
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
14+
* Copyright (c) 2013-2017 Cisco Systems, Inc. All rights reserved
1515
* $COPYRIGHT$
1616
*
1717
* Additional copyrights may follow
@@ -464,9 +464,7 @@ opal_pack_general_function( opal_convertor_t* pConvertor,
464464
unsigned char *conv_ptr, *iov_ptr;
465465
size_t iov_len_local;
466466
uint32_t iov_count;
467-
int type, rc;
468-
const opal_convertor_master_t* master = pConvertor->master;
469-
ptrdiff_t advance;
467+
int type;
470468

471469
DO_DEBUG( opal_output( 0, "opal_convertor_general_pack( %p:%p, {%p, %lu}, %d )\n",
472470
(void*)pConvertor, (void*)pConvertor->pBaseBuf,
@@ -566,7 +564,10 @@ opal_pack_general_function( opal_convertor_t* pConvertor,
566564
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, OPAL_DATATYPE_LOOP, count_desc,
567565
pStack->disp + local_disp);
568566
pos_desc++;
567+
#if 0
568+
// This label currently in another if 0'ed out block
569569
update_loop_description: /* update the current state */
570+
#endif
570571
conv_ptr = pConvertor->pBaseBuf + pStack->disp;
571572
UPDATE_INTERNAL_COUNTERS( description, pos_desc, pElem, count_desc );
572573
DDT_DUMP_STACK( pConvertor->pStack, pConvertor->stack_pos, pElem, "advance loop" );

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,7 +2506,7 @@ btl_openib_component_init(int *num_btl_modules,
25062506
mca_btl_openib_frag_init_data_t *init_data;
25072507
struct dev_distance *dev_sorted;
25082508
float distance;
2509-
int index, value;
2509+
int index;
25102510
bool found;
25112511
mca_base_var_source_t source;
25122512
int list_count = 0;
@@ -2872,8 +2872,6 @@ btl_openib_component_init(int *num_btl_modules,
28722872
mca_btl_openib_component.if_exclude_list = NULL;
28732873
}
28742874

2875-
value = opal_mem_hooks_support_level();
2876-
28772875
#if OPAL_CUDA_SUPPORT
28782876
if (mca_btl_openib_component.cuda_want_gdr && (0 == opal_leave_pinned)) {
28792877
opal_show_help("help-mpi-btl-openib.txt",

opal/mca/btl/openib/btl_openib_mca.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
1515
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
1616
* reserved.
@@ -678,20 +678,6 @@ int btl_openib_register_mca_params(void)
678678
"(0 = do not allow; 1 = allow)",
679679
false, &mca_btl_openib_component.allow_different_subnets));
680680

681-
#if MEMORY_LINUX_MALLOC_ALIGN_ENABLED
682-
tmp = mca_base_var_find ("opal", "memory", "linux", "memalign");
683-
if (0 <= tmp) {
684-
(void) mca_base_var_register_synonym(tmp, "opal", "btl", "openib", "memalign",
685-
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
686-
}
687-
688-
tmp = mca_base_var_find ("opal", "memory", "linux", "memalign_threshold");
689-
if (0 <= tmp) {
690-
(void) mca_base_var_register_synonym(tmp, "opal", "btl", "openib", "memalign_threshold",
691-
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
692-
}
693-
#endif /* MEMORY_LINUX_MALLOC_ALIGN_ENABLED */
694-
695681
/* Register any MCA params for the connect pseudo-components */
696682
if (OPAL_SUCCESS == ret) {
697683
ret = opal_btl_openib_connect_base_register();

opal/mca/common/sm/common_sm_mpool.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
1313
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
1414
* All rights reserved.
1515
* Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved.
@@ -52,14 +52,6 @@ static void *mca_common_sm_mpool_alloc (mca_mpool_base_module_t *mpool,
5252
static void mca_common_sm_mpool_free(mca_mpool_base_module_t *mpool,
5353
void *addr);
5454

55-
/**
56-
* Fault Tolerance Event Notification Function
57-
* @param state Checkpoint Stae
58-
* @return OPAL_SUCCESS or failure status
59-
*/
60-
static int mca_common_sm_mpool_ft_event (int state);
61-
62-
6355
/*
6456
* Initializes the mpool module.
6557
*/

0 commit comments

Comments
 (0)