From 694ef54978f382507a5127ce66da7770929ba2c2 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Wed, 7 Sep 2011 20:03:24 -0400 Subject: Eliminate many "var set but not used" warnings with newer gcc. This fixes ~200 such warnings, but leaves three categories untouched. (1) Rpcgen code. (2) Macros which set variables in the outer (calling function) scope. (3) Variables which are set via function calls which may have side effects. Change-Id: I6554555f78ed26134251504b038da7e94adacbcd BUG: 2550 Reviewed-on: http://review.gluster.com/371 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- cli/src/cli-cmd-volume.c | 4 ---- cli/src/cli.c | 12 ------------ 2 files changed, 16 deletions(-) (limited to 'cli/src') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index b61eb31c0bc..68c5ef57870 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1186,11 +1186,9 @@ cli_cmd_log_level_cbk (struct cli_state *state, struct cli_cmd_word *word, rpc_clnt_procedure_t *proc = NULL; call_frame_t *frame = NULL; dict_t *dict = NULL; - int parse_error = 0; if (wordcount != 6) { cli_usage_out (word->pattern); - parse_error = 1; goto out; } @@ -1220,11 +1218,9 @@ cli_cmd_volume_status_cbk (struct cli_state *state, rpc_clnt_procedure_t *proc = NULL; call_frame_t *frame = NULL; dict_t *dict = NULL; - int parse_error = 0; if (wordcount != 3) { cli_usage_out (word->pattern); - parse_error = 1; goto out; } diff --git a/cli/src/cli.c b/cli/src/cli.c index 51270f8a00a..858c7091b8d 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -271,7 +271,6 @@ cli_submit_request (void *req, call_frame_t *frame, { int ret = -1; int count = 0; - char start_ping = 0; struct iovec iov = {0, }; struct iobuf *iobuf = NULL; char new_iobref = 0; @@ -314,17 +313,6 @@ cli_submit_request (void *req, call_frame_t *frame, ret = rpc_clnt_submit (global_rpc, prog, procnum, cbkfn, &iov, count, NULL, 0, iobref, frame, NULL, 0, NULL, 0, NULL); - - if (ret == 0) { - pthread_mutex_lock (&global_rpc->conn.lock); - { - if (!global_rpc->conn.ping_started) { - start_ping = 1; - } - } - pthread_mutex_unlock (&global_rpc->conn.lock); - } - ret = 0; out: -- cgit