diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2011-09-07 20:03:24 -0400 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-09-07 23:48:01 -0700 |
commit | 694ef54978f382507a5127ce66da7770929ba2c2 (patch) | |
tree | b98ee679c8d5f4b3556c0bf9af44e6b9729c2881 /cli | |
parent | 81530d227deb52af38c7df770aef2200b9de539f (diff) |
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 <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 4 | ||||
-rw-r--r-- | cli/src/cli.c | 12 |
2 files changed, 0 insertions, 16 deletions
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: |