Skip to content

Commit 089c632

Browse files
committed
Remove a bunch of dead code: gcc 4.7 warns of set-but-unused
variables. So get rid of them. This commit was SVN r28538.
1 parent 1b1051d commit 089c632

File tree

27 files changed

+57
-100
lines changed

27 files changed

+57
-100
lines changed

ompi/mca/bcol/base/bcol_base_frame.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
33
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
4+
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
45
* $COPYRIGHT$
56
*
67
* Additional copyrights may follow
@@ -269,10 +270,6 @@ int mca_bcol_base_fn_table_destroy(struct mca_bcol_base_module_t *bcol_module){
269270
int bcol_fn;
270271

271272
for (bcol_fn = 0; bcol_fn < BCOL_NUM_OF_FUNCTIONS; bcol_fn++){
272-
opal_list_t *tmp_list;
273-
274-
tmp_list = &bcol_module->bcol_fns_table[bcol_fn];
275-
276273
/* gvm FIX: Go through the list and destroy each item */
277274
/* Destroy the function table object for each bcol type list */
278275
OBJ_DESTRUCT(&(bcol_module->bcol_fns_table[bcol_fn]));

ompi/mca/bcol/basesmuma/bcol_basesmuma_bcast_prime.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
33
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
4+
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
45
* $COPYRIGHT$
56
*
67
* Additional copyrights may follow
@@ -252,9 +253,6 @@ int bcol_basesmuma_bcast_k_nomial_anyroot(bcol_function_args_t *input_args,
252253
int count=input_args->count;
253254
struct ompi_datatype_t* dtype=input_args->dtype;
254255
int64_t sequence_number=input_args->sequence_num;
255-
256-
257-
int pow_k_levels;
258256
int radix = cs->k_nomial_radix;
259257
int radix_mask;
260258
int relative_rank;
@@ -264,8 +262,6 @@ int bcol_basesmuma_bcast_k_nomial_anyroot(bcol_function_args_t *input_args,
264262
int bcol_id = (int) bcol_module->super.bcol_id;
265263
volatile mca_bcol_basesmuma_payload_t *data_buffs;
266264
volatile void* parent_data_pointer;
267-
volatile void* my_data_pointer;
268-
269265

270266
volatile mca_bcol_basesmuma_header_t *child_ctl_pointer;
271267
volatile mca_bcol_basesmuma_header_t *my_ctl_pointer;
@@ -294,15 +290,12 @@ int bcol_basesmuma_bcast_k_nomial_anyroot(bcol_function_args_t *input_args,
294290
idx=SM_ARRAY_INDEX(leading_dim,buff_idx,0);
295291

296292
/* get pow_k_levels and pow_k_group_size */
297-
pow_k_levels = bcol_module->pow_k_levels;
298293
pow_k_group_size = bcol_module->pow_k;
299294

300295

301296
data_buffs=(volatile mca_bcol_basesmuma_payload_t *)
302297
bcol_module->colls_with_user_data.data_buffs+idx;
303298

304-
my_data_pointer = data_buffs[my_rank].payload;
305-
306299
/* Set pointer to current proc ctrl region */
307300
my_ctl_pointer = data_buffs[my_rank].ctl_struct;
308301

ompi/mca/bcol/basesmuma/bcol_basesmuma_rd_nb_barrier.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2009-2010 UT-Battelle, LLC. All rights reserved.
33
* Copyright (c) 2009-2010 Mellanox Technologies. All rights reserved.
4+
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
45
* $COPYRIGHT$
56
*
67
* Additional copyrights may follow
@@ -36,7 +37,7 @@ int bcol_basesmuma_rd_nb_barrier_init_admin(
3637
int pair_rank;
3738
mca_bcol_basesmuma_ctl_struct_t **ctl_structs;
3839
netpatterns_pair_exchange_node_t *my_exchange_node;
39-
int extra_rank, my_rank, pow_2;
40+
int extra_rank, my_rank;
4041
mca_bcol_basesmuma_ctl_struct_t volatile *partner_ctl;
4142
mca_bcol_basesmuma_ctl_struct_t volatile *my_ctl;
4243
int64_t bank_genaration;
@@ -54,7 +55,6 @@ int bcol_basesmuma_rd_nb_barrier_init_admin(
5455

5556
my_exchange_node=&(bcol_module->recursive_doubling_tree);
5657
my_rank=bcol_module->super.sbgp_partner_module->my_index;
57-
pow_2=bcol_module->super.sbgp_partner_module->pow_2;
5858
my_ctl=ctl_structs[my_rank];
5959
/* debug print */
6060
/*
@@ -206,7 +206,7 @@ int bcol_basesmuma_rd_nb_barrier_progress_admin(
206206
int pair_rank, start_index, restart_phase;
207207
mca_bcol_basesmuma_ctl_struct_t **ctl_structs;
208208
netpatterns_pair_exchange_node_t *my_exchange_node;
209-
int extra_rank, my_rank, pow_2;
209+
int extra_rank, my_rank;
210210
mca_bcol_basesmuma_ctl_struct_t volatile *partner_ctl;
211211
mca_bcol_basesmuma_ctl_struct_t volatile *my_ctl;
212212
int64_t bank_genaration;
@@ -224,7 +224,6 @@ int bcol_basesmuma_rd_nb_barrier_progress_admin(
224224

225225
my_exchange_node=&(bcol_module->recursive_doubling_tree);
226226
my_rank=bcol_module->super.sbgp_partner_module->my_index;
227-
pow_2=bcol_module->super.sbgp_partner_module->pow_2;
228227
my_ctl=ctl_structs[my_rank];
229228

230229
/* check to make sure that this should be progressed */

ompi/mca/dpm/base/dpm_base_common_fns.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2006-2007 University of Houston. All rights reserved.
1414
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
1515
* reserved.
16-
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
16+
* Copyright (c) 2007-2013 Cisco Systems, Inc. All rights reserved.
1717
*
1818
* $COPYRIGHT$
1919
*
@@ -184,7 +184,6 @@ int ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj **
184184
char *treq=NULL;
185185
int totalcount = 0;
186186
int i;
187-
int ret;
188187

189188
for (i=0; i<count; i++) {
190189
if (NULL == objs[i]) {
@@ -209,7 +208,7 @@ int ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj **
209208
}
210209

211210
/* force all non-blocking all-to-alls to finish */
212-
ret = ompi_request_wait_all (2*totalcount, reqs, MPI_STATUSES_IGNORE);
211+
ompi_request_wait_all (2*totalcount, reqs, MPI_STATUSES_IGNORE);
213212

214213
/* Finally, free everything */
215214
for (i=0; i< count; i++ ) {

opal/class/opal_tree.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (c) 2012 The University of Tennessee and The University
55
* of Tennessee Research Foundation. All rights
66
* reserved.
7+
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
78
* $COPYRIGHT$
89
*
910
* Additional copyrights may follow
@@ -566,7 +567,6 @@ int opal_tree_copy_subtree(opal_tree_t *from_tree, opal_tree_item_t *from_item,
566567

567568
opal_tree_item_t *opal_tree_dup_item(opal_tree_t *base, opal_tree_item_t *from)
568569
{
569-
int ret;
570570
opal_buffer_t *buffer = NULL;
571571
opal_tree_item_t *new_item = NULL;
572572

@@ -575,7 +575,7 @@ opal_tree_item_t *opal_tree_dup_item(opal_tree_t *base, opal_tree_item_t *from)
575575
opal_tree_serialize(from, buffer);
576576

577577
new_item = OBJ_NEW(opal_tree_item_t);
578-
ret = opal_tree_deserialize(buffer, new_item);
578+
opal_tree_deserialize(buffer, new_item);
579579

580580
OBJ_RELEASE(buffer);
581581
return new_item;
@@ -670,7 +670,7 @@ static opal_tree_item_t *find_in_descendants(opal_tree_item_t* item, void *key)
670670
*/
671671
opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, void *key)
672672
{
673-
opal_tree_item_t *root, *curr_item = item, *result = NULL;
673+
opal_tree_item_t *curr_item = item, *result = NULL;
674674

675675
if (!opal_tree_is_empty(item->opal_tree_container)) {
676676
/* check my descendant for a match */
@@ -684,7 +684,6 @@ opal_tree_item_t *opal_tree_find_with(opal_tree_item_t *item, void *key)
684684
}
685685

686686
/* check my ancestors (uncles) for match */
687-
root = opal_tree_get_root(item->opal_tree_container);
688687
curr_item = item;
689688
while (!result && curr_item && curr_item->opal_tree_num_ancestors > 0){
690689
curr_item = opal_tree_get_next_sibling(item->opal_tree_parent);

opal/mca/base/mca_base_var.c

Lines changed: 2 additions & 3 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) 2008-2011 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* $COPYRIGHT$
@@ -2008,7 +2008,7 @@ int mca_base_var_group_get_stamp (void)
20082008

20092009
int mca_base_var_dump(int index, char ***out, mca_base_var_dump_type_t output_type)
20102010
{
2011-
const char *project, *framework, *component, *full_name;
2011+
const char *framework, *component, *full_name;
20122012
int i, line_count, line = 0, enum_count = 0;
20132013
char *value_string, *source_string, *tmp;
20142014
const mca_base_var_storage_t *value;
@@ -2039,7 +2039,6 @@ int mca_base_var_dump(int index, char ***out, mca_base_var_dump_type_t output_ty
20392039
return ret;
20402040
}
20412041

2042-
project = group->group_project;
20432042
framework = group->group_framework;
20442043
component = group->group_component ? group->group_component : "base";
20452044
full_name = var->mbv_full_name;

opal/mca/base/mca_base_var_enum.c

Lines changed: 3 additions & 3 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) 2008-2011 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* $COPYRIGHT$
@@ -63,7 +63,7 @@ int mca_base_var_enum_create (char *name, mca_base_var_enum_value_t *values, mca
6363

6464
static int enum_dump (mca_base_var_enum_t *self, char **out)
6565
{
66-
size_t len, i;
66+
size_t i;
6767
char *tmp;
6868
int ret;
6969

@@ -74,7 +74,7 @@ static int enum_dump (mca_base_var_enum_t *self, char **out)
7474
}
7575

7676
tmp = NULL;
77-
for (i = 0, len = 0 ; self->enum_values[i].string ; ++i) {
77+
for (i = 0; self->enum_values[i].string ; ++i) {
7878
ret = asprintf (out, "%s%s%d:\"%s\"", tmp ? tmp : "", tmp ? ", " : "", self->enum_values[i].value,
7979
self->enum_values[i].string);
8080
if (tmp) free (tmp);

opal/runtime/opal_cr.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights
1313
* reserved.
1414
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
15-
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
15+
* Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved.
1616
* $COPYRIGHT$
1717
*
1818
* Additional copyrights may follow
@@ -917,7 +917,6 @@ int opal_cr_reg_coord_callback(opal_cr_coord_callback_fn_t new_func,
917917
}
918918

919919
int opal_cr_refresh_environ(int prev_pid) {
920-
int val;
921920
char *file_name = NULL;
922921
#if OPAL_ENABLE_CRDEBUG == 1
923922
char *tmp;
@@ -957,8 +956,6 @@ int opal_cr_refresh_environ(int prev_pid) {
957956
opal_output_verbose(10, opal_cr_output,
958957
"opal_cr: init: C/R Debugging Enabled [%s] (refresh)\n",
959958
(MPIR_debug_with_checkpoint ? "True": "False"));
960-
#else
961-
val = 0; /* Silence Compiler warning */
962959
#endif
963960

964961
if( NULL != file_name ){

opal/util/if.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,7 @@ int16_t opal_ifaddrtokindex(const char* if_addr)
309309

310310
if (AF_INET == r->ai_family) {
311311
struct sockaddr_in ipv4;
312-
struct sockaddr_in *inaddr;
313312

314-
inaddr = (struct sockaddr_in*) &intf->if_addr;
315313
memcpy (&ipv4, r->ai_addr, r->ai_addrlen);
316314
if (opal_net_samenetwork((struct sockaddr*)&ipv4, (struct sockaddr*)&intf->if_addr, intf->if_mask)) {
317315
return intf->if_kernel_index;

orte/mca/dfs/orted/dfs_orted.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
33
* All rights reserved.
4+
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
45
* $COPYRIGHT$
56
*
67
* Additional copyrights may follow
@@ -1285,7 +1286,7 @@ static void recv_dfs_cmd(int status, orte_process_name_t* sender,
12851286
orte_dfs_cmd_t cmd;
12861287
int32_t cnt;
12871288
opal_list_item_t *item;
1288-
int remote_fd, my_fd;
1289+
int my_fd;
12891290
int32_t rc, nmaps;
12901291
char *filename;
12911292
orte_dfs_tracker_t *trk;
@@ -1581,7 +1582,6 @@ static void recv_dfs_cmd(int status, orte_process_name_t* sender,
15811582

15821583
case ORTE_DFS_READ_CMD:
15831584
/* set default error */
1584-
remote_fd = -1;
15851585
my_fd = -1;
15861586
bytes_read = -1;
15871587
read_buf = NULL;

0 commit comments

Comments
 (0)