summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-algorithm.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2011-09-07 20:03:24 -0400
committerAnand Avati <avati@gluster.com>2011-09-07 23:48:01 -0700
commit694ef54978f382507a5127ce66da7770929ba2c2 (patch)
treeb98ee679c8d5f4b3556c0bf9af44e6b9729c2881 /xlators/cluster/afr/src/afr-self-heal-algorithm.c
parent81530d227deb52af38c7df770aef2200b9de539f (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 'xlators/cluster/afr/src/afr-self-heal-algorithm.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-algorithm.c b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
index 63889c8452b..48399b5e93d 100644
--- a/xlators/cluster/afr/src/afr-self-heal-algorithm.c
+++ b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
@@ -95,14 +95,12 @@ static int
sh_loop_driver_done (call_frame_t *sh_frame, xlator_t *this,
call_frame_t *last_loop_frame)
{
- afr_private_t *priv = NULL;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
afr_sh_algo_private_t *sh_priv = NULL;
int32_t total_blocks = 0;
int32_t diff_blocks = 0;
- priv = this->private;
local = sh_frame->local;
sh = &local->self_heal;
sh_priv = sh->private;
@@ -358,18 +356,13 @@ static int
sh_loop_return (call_frame_t *sh_frame, xlator_t *this, call_frame_t *loop_frame,
int32_t op_ret, int32_t op_errno)
{
- afr_private_t * priv = NULL;
afr_local_t * loop_local = NULL;
afr_self_heal_t * loop_sh = NULL;
afr_local_t * sh_local = NULL;
afr_self_heal_t *sh = NULL;
- afr_sh_algo_private_t *sh_priv = NULL;
-
- priv = this->private;
sh_local = sh_frame->local;
sh = &sh_local->self_heal;
- sh_priv = sh->private;
if (loop_frame) {
loop_local = loop_frame->local;
@@ -405,7 +398,6 @@ sh_loop_write_cbk (call_frame_t *loop_frame, void *cookie, xlator_t *this,
call_frame_t *sh_frame = NULL;
afr_local_t * sh_local = NULL;
afr_self_heal_t *sh = NULL;
- afr_sh_algo_private_t *sh_priv = NULL;
int call_count = 0;
int child_index = 0;
@@ -416,7 +408,6 @@ sh_loop_write_cbk (call_frame_t *loop_frame, void *cookie, xlator_t *this,
sh_frame = loop_sh->sh_frame;
sh_local = sh_frame->local;
sh = &sh_local->self_heal;
- sh_priv = sh->private;
child_index = (long) cookie;
@@ -631,7 +622,6 @@ sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this)
afr_private_t *priv = NULL;
afr_local_t *loop_local = NULL;
afr_self_heal_t *loop_sh = NULL;
- afr_sh_algo_private_t *loop_sh_priv = NULL;
int call_count = 0;
int i = 0;
@@ -639,8 +629,6 @@ sh_diff_checksum (call_frame_t *loop_frame, xlator_t *this)
loop_local = loop_frame->local;
loop_sh = &loop_local->self_heal;
- loop_sh_priv = loop_sh->private;
-
call_count = loop_sh->active_sinks + 1; /* sinks and source */
loop_local->call_count = call_count;