summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
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
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')
-rw-r--r--xlators/cluster/afr/src/afr-common.c4
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c4
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c4
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c44
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.c12
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c10
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c13
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c12
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c4
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c2
-rw-r--r--xlators/cluster/afr/src/pump.c14
-rw-r--r--xlators/cluster/dht/src/dht-common.c20
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c2
-rw-r--r--xlators/cluster/dht/src/dht-rename.c2
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c2
15 files changed, 0 insertions, 149 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index a6738280695..9803744a0ec 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -429,9 +429,7 @@ afr_inode_rm_stale_children (xlator_t *this, inode_t *inode, int32_t read_child,
int32_t *stale_children)
{
afr_inode_params_t params = {0};
- afr_private_t *priv = NULL;
- priv = this->private;
GF_ASSERT (read_child >= 0);
GF_ASSERT (stale_children);
@@ -1155,14 +1153,12 @@ afr_lookup_select_read_child (afr_local_t *local, xlator_t *this,
int ret = -1;
dict_t **xattrs = NULL;
int32_t *success_children = NULL;
- struct iatt *bufs = NULL;
afr_transaction_type type = AFR_METADATA_TRANSACTION;
GF_ASSERT (local);
GF_ASSERT (this);
GF_ASSERT (local->success_count > 0);
- bufs = local->cont.lookup.bufs;
success_children = local->cont.lookup.success_children;
/*We can take the success_children[0] only because we already
*handle the conflicting children other wise, we could select the
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index ec3639ff73b..d323e6d5fd5 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -484,15 +484,11 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
gf_dirent_t *entries)
{
- afr_private_t * priv = NULL;
afr_local_t * local = NULL;
gf_dirent_t * entry = NULL;
gf_dirent_t * tmp = NULL;
- int child_index = -1;
- priv = this->private;
local = frame->local;
- child_index = (long) cookie;
if (op_ret == -1)
goto out;
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 1c25d160689..9a17c20309b 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -1509,12 +1509,10 @@ afr_unlink_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *postparent)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
int call_count = -1;
int child_index = (long) cookie;
local = frame->local;
- priv = this->private;
LOCK (&frame->lock);
{
@@ -1709,13 +1707,11 @@ afr_rmdir_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *postparent)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
int call_count = -1;
int child_index = (long) cookie;
int read_child = 0;
local = frame->local;
- priv = this->private;
LOCK (&frame->lock);
{
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 2168ee26f69..483d7250e43 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -652,11 +652,9 @@ afr_unlock_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
afr_local_t *local = NULL;
- afr_internal_lock_t *int_lock = NULL;
int32_t child_index = (long)cookie;
local = frame->local;
- int_lock = &local->internal_lock;
afr_trace_entrylk_out (frame, AFR_ENTRYLK_TRANSACTION,
AFR_UNLOCK_OP, NULL, op_ret,
@@ -732,13 +730,10 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_private_t *priv = NULL;
- int done = 0;
int child_index = (long) cookie;
local = frame->local;
int_lock = &local->internal_lock;
- priv = this->private;
LOCK (&frame->lock);
{
@@ -750,7 +745,6 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"please load features/locks xlator on server");
local->op_ret = op_ret;
int_lock->lock_op_ret = op_ret;
- done = 1;
}
local->child_up[child_index] = 0;
@@ -796,7 +790,6 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
afr_local_t *local = NULL;
loc_t *lower = NULL;
loc_t *higher = NULL;
- const char *lower_name = NULL;
const char *higher_name = NULL;
int child_index = (long) cookie;
@@ -838,10 +831,6 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&local->transaction.new_parent_loc,
local->transaction.new_basename);
- lower_name = (lower == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
higher = (lower == &local->transaction.parent_loc ?
&local->transaction.new_parent_loc :
&local->transaction.parent_loc);
@@ -916,11 +905,8 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
- afr_fd_ctx_t *fd_ctx = NULL;
loc_t *lower = NULL;
- loc_t *higher = NULL;
const char *lower_name = NULL;
- const char *higher_name = NULL;
struct gf_flock flock = {0,};
uint64_t ctx = 0;
int ret = 0;
@@ -951,8 +937,6 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
return 0;
}
- fd_ctx = (afr_fd_ctx_t *)(long) ctx;
-
/* skip over children that or down
or don't have the fd open */
@@ -1042,14 +1026,6 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
local->transaction.basename :
local->transaction.new_basename);
- higher = (lower == &local->transaction.parent_loc ?
- &local->transaction.new_parent_loc :
- &local->transaction.parent_loc);
-
- higher_name = (higher == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
afr_trace_entrylk_in (frame, AFR_ENTRYLK_TRANSACTION,
AFR_LOCK_OP, lower_name, child_index);
@@ -1137,13 +1113,11 @@ afr_nonblocking_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_private_t *priv = NULL;
int call_count = 0;
int child_index = (long) cookie;
local = frame->local;
int_lock = &local->internal_lock;
- priv = this->private;
afr_trace_entrylk_out (frame, AFR_ENTRYLK_TRANSACTION,
AFR_LOCK_OP, NULL, op_ret,
@@ -1312,13 +1286,11 @@ afr_nonblocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_private_t *priv = NULL;
int call_count = 0;
int child_index = (long) cookie;
local = frame->local;
int_lock = &local->internal_lock;
- priv = this->private;
afr_trace_inodelk_out (frame, AFR_INODELK_NB_TRANSACTION,
AFR_LOCK_OP, NULL, op_ret,
@@ -1589,7 +1561,6 @@ afr_post_unlock_lower_cbk (call_frame_t *frame, xlator_t *this)
afr_local_t *local = NULL;
loc_t *lower = NULL;
loc_t *higher = NULL;
- const char *lower_name = NULL;
const char *higher_name = NULL;
local = frame->local;
@@ -1600,10 +1571,6 @@ afr_post_unlock_lower_cbk (call_frame_t *frame, xlator_t *this)
&local->transaction.new_parent_loc,
local->transaction.new_basename);
- lower_name = (lower == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
higher = (lower == &local->transaction.parent_loc ?
&local->transaction.new_parent_loc :
&local->transaction.parent_loc);
@@ -1632,9 +1599,7 @@ afr_rename_unlock (call_frame_t *frame, xlator_t *this)
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
loc_t *lower = NULL;
- loc_t *higher = NULL;
const char *lower_name = NULL;
- const char *higher_name = NULL;
local = frame->local;
int_lock = &local->internal_lock;
@@ -1648,15 +1613,6 @@ afr_rename_unlock (call_frame_t *frame, xlator_t *this)
local->transaction.basename :
local->transaction.new_basename);
- higher = (lower == &local->transaction.parent_loc ?
- &local->transaction.new_parent_loc :
- &local->transaction.parent_loc);
-
- higher_name = (higher == &local->transaction.parent_loc ?
- local->transaction.basename :
- local->transaction.new_basename);
-
-
if (__is_lower_locked (frame, this)) {
gf_log (this->name, GF_LOG_DEBUG,
"unlocking lower");
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;
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 0846184c29f..169d549d9c6 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1241,12 +1241,8 @@ afr_sh_missing_entries_lookup_cbk (call_frame_t *frame, void *cookie,
{
int call_count = 0;
afr_local_t *local = NULL;
- afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
- sh = &local->self_heal;
- priv = this->private;
afr_sh_common_lookup_resp_handler (frame, cookie, this, op_ret,
op_errno, inode, buf, xattr,
@@ -1852,11 +1848,9 @@ afr_sh_entrylk (call_frame_t *frame, xlator_t *this, loc_t *loc,
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_self_heal_t *sh = NULL;
local = frame->local;
int_lock = &local->internal_lock;
- sh = &local->self_heal;
int_lock->transaction_lk_type = AFR_SELFHEAL_LK;
int_lock->selfheal_lk_type = AFR_ENTRY_SELF_HEAL_LK;
@@ -1876,15 +1870,11 @@ static int
afr_self_heal_parent_entrylk (call_frame_t *frame, xlator_t *this,
afr_lock_cbk_t lock_cbk)
{
- afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
- int_lock = &local->internal_lock;
sh = &local->self_heal;
- priv = this->private;
gf_log (this->name, GF_LOG_TRACE,
"attempting to recreate missing entries for path=%s",
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 009ac705be3..cbc6d6e39a1 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -76,11 +76,9 @@ afr_sh_data_done (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
sh->completion_cbk (frame, this);
@@ -253,14 +251,12 @@ afr_sh_data_setattr_fstat_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
struct iatt *buf)
{
- afr_private_t *priv = NULL;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
int child_index = (long) cookie;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
GF_ASSERT (sh->source == child_index);
if (op_ret != -1)
@@ -535,12 +531,10 @@ afr_sh_data_sync_prepare (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
struct afr_sh_algorithm *sh_algo = NULL;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
sh->algo_completion_cbk = afr_sh_data_erase_pending;
sh->algo_abort_cbk = afr_sh_data_fail;
@@ -815,12 +809,10 @@ afr_lookup_select_read_child_by_txn_type (xlator_t *this, afr_local_t *local,
int32_t nsources = 0;
int32_t prev_read_child = -1;
int32_t config_read_child = -1;
- afr_self_heal_t *sh = NULL;
priv = this->private;
bufs = local->cont.lookup.bufs;
success_children = local->cont.lookup.success_children;
- sh = &local->self_heal;
pending_matrix = afr_create_pending_matrix (priv->child_count);
if (NULL == pending_matrix)
@@ -1165,11 +1157,9 @@ afr_sh_data_lock_rec (call_frame_t *frame, xlator_t *this, off_t start, off_t le
{
afr_internal_lock_t *int_lock = NULL;
afr_local_t *local = NULL;
- afr_self_heal_t *sh = NULL;
local = frame->local;
int_lock = &local->internal_lock;
- sh = &local->self_heal;
int_lock->transaction_lk_type = AFR_SELFHEAL_LK;
int_lock->selfheal_lk_type = AFR_DATA_SELF_HEAL_LK;
@@ -1227,13 +1217,10 @@ afr_sh_data_lock (call_frame_t *frame, xlator_t *this,
afr_lock_cbk_t failure_handler)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
afr_self_heal_t * sh = NULL;
-
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
sh->data_lock_success_handler = success_handler;
sh->data_lock_failure_handler = failure_handler;
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index ddca2619db8..8f1c9698607 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -54,11 +54,9 @@ afr_sh_entry_done (call_frame_t *frame, xlator_t *this)
{
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
- afr_private_t *priv = NULL;
local = frame->local;
sh = &local->self_heal;
- priv = this->private;
if (sh->healing_fd)
fd_unref (sh->healing_fd);
@@ -420,13 +418,11 @@ afr_sh_entry_expunge_remove_cbk (call_frame_t *expunge_frame, void *cookie,
afr_local_t *expunge_local = NULL;
afr_self_heal_t *expunge_sh = NULL;
int active_src = 0;
- call_frame_t *frame = NULL;
int32_t valid = 0;
priv = this->private;
expunge_local = expunge_frame->local;
expunge_sh = &expunge_local->self_heal;
- frame = expunge_sh->sh_frame;
active_src = (long) cookie;
@@ -941,7 +937,6 @@ afr_sh_entry_impunge_setattr_cbk (call_frame_t *impunge_frame, void *cookie,
afr_self_heal_t *sh = NULL;
afr_self_heal_t *impunge_sh = NULL;
call_frame_t *frame = NULL;
- int active_src = 0;
int child_index = 0;
int32_t impunge_ret_child = 0;
@@ -951,7 +946,6 @@ afr_sh_entry_impunge_setattr_cbk (call_frame_t *impunge_frame, void *cookie,
frame = impunge_sh->sh_frame;
local = frame->local;
sh = &local->self_heal;
- active_src = impunge_sh->active_source;
child_index = (long) cookie;
if (op_ret == 0) {
@@ -992,14 +986,12 @@ afr_sh_entry_impunge_xattrop_cbk (call_frame_t *impunge_frame, void *cookie,
{
afr_private_t *priv = NULL;
afr_local_t *impunge_local = NULL;
- afr_self_heal_t *impunge_sh = NULL;
int child_index = 0;
struct iatt stbuf = {0};
int32_t valid = 0;
priv = this->private;
impunge_local = impunge_frame->local;
- impunge_sh = &impunge_local->self_heal;
child_index = (long) cookie;
@@ -1352,7 +1344,6 @@ afr_sh_entry_impunge_symlink_unlink_cbk (call_frame_t *impunge_frame,
int child_index = -1;
call_frame_t *frame = NULL;
int call_count = -1;
- int active_src = -1;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
int32_t impunge_ret_child = 0;
@@ -1363,7 +1354,6 @@ afr_sh_entry_impunge_symlink_unlink_cbk (call_frame_t *impunge_frame,
frame = impunge_sh->sh_frame;
local = frame->local;
sh = &local->self_heal;
- active_src = impunge_sh->active_source;
child_index = (long) cookie;
@@ -1763,7 +1753,6 @@ afr_sh_entry_impunge_entry_cbk (call_frame_t *impunge_frame, void *cookie,
int call_count = 0;
int child_index = 0;
call_frame_t *frame = NULL;
- int active_src = 0;
afr_local_t *local = NULL;
afr_self_heal_t *sh = NULL;
int32_t impunge_ret_child = 0;
@@ -1775,7 +1764,6 @@ afr_sh_entry_impunge_entry_cbk (call_frame_t *impunge_frame, void *cookie,
local = frame->local;
sh = &local->self_heal;
child_index = (long) cookie;
- active_src = impunge_sh->active_source;
if ((op_ret == -1 && op_errno == ENOENT)
|| (IA_ISLNK (impunge_sh->impunging_entry_mode))) {
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index fb92cd999ed..ba411853530 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -560,13 +560,9 @@ afr_sh_metadata_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t *local = NULL;
int call_count = 0;
- int child_index = 0;
-
local = frame->local;
- child_index = (long) cookie;
-
afr_sh_common_lookup_resp_handler (frame, cookie, this, op_ret,
op_errno, inode, buf, xattr,
postparent, &local->loc);
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index e9b8ee7dcdf..b40e171030f 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -718,12 +718,10 @@ afr_changelog_pre_op_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
afr_local_t * local = NULL;
afr_private_t * priv = this->private;
- loc_t * loc = NULL;
int call_count = -1;
int child_index = (long) cookie;
local = frame->local;
- loc = &local->loc;
LOCK (&frame->lock);
{
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c
index d27ecd21526..9cc4cf3c34e 100644
--- a/xlators/cluster/afr/src/pump.c
+++ b/xlators/cluster/afr/src/pump.c
@@ -218,7 +218,6 @@ static int
pump_save_path (xlator_t *this, const char *path)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
pump_state_t state;
dict_t *dict = NULL;
loc_t loc = {0};
@@ -230,7 +229,6 @@ pump_save_path (xlator_t *this, const char *path)
return 0;
priv = this->private;
- pump_priv = priv->pump_private;
GF_ASSERT (priv->root_inode);
@@ -352,14 +350,12 @@ static gf_boolean_t
is_pump_traversal_allowed (xlator_t *this, const char *path)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
pump_state_t state;
const char *resume_path = NULL;
gf_boolean_t ret = _gf_true;
priv = this->private;
- pump_priv = priv->pump_private;
state = pump_get_state ();
@@ -404,7 +400,6 @@ static int
gf_pump_traverse_directory (loc_t *loc)
{
xlator_t *this = NULL;
- afr_private_t *priv = NULL;
fd_t *fd = NULL;
off_t offset = 0;
@@ -422,7 +417,6 @@ gf_pump_traverse_directory (loc_t *loc)
INIT_LIST_HEAD (&entries.list);
this = THIS;
- priv = this->private;
GF_ASSERT (loc->inode);
@@ -553,12 +547,10 @@ static int
pump_update_resume_path (xlator_t *this)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
const char *resume_path = NULL;
priv = this->private;
- pump_priv = priv->pump_private;
resume_path = pump_get_resume_path (this);
@@ -583,7 +575,6 @@ pump_xattr_cleaner (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
loc_t loc = {0};
int i = 0;
int ret = 0;
@@ -591,7 +582,6 @@ pump_xattr_cleaner (call_frame_t *frame, void *cookie, xlator_t *this,
int sink = 1;
priv = this->private;
- pump_priv = priv->pump_private;
build_root_loc (priv->root_inode, &loc);
@@ -779,12 +769,10 @@ pump_task_completion (int ret, call_frame_t *sync_frame, void *data)
{
xlator_t *this = NULL;
afr_private_t *priv = NULL;
- pump_private_t *pump_priv = NULL;
this = THIS;
priv = this->private;
- pump_priv = priv->pump_private;
inode_unref (priv->root_inode);
STACK_DESTROY (sync_frame->root);
@@ -1579,11 +1567,9 @@ static int
afr_setxattr_unwind (call_frame_t *frame, xlator_t *this)
{
afr_local_t * local = NULL;
- afr_private_t * priv = NULL;
call_frame_t *main_frame = NULL;
local = frame->local;
- priv = this->private;
LOCK (&frame->lock);
{
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index f623fad9fd5..b5168605bbb 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -150,7 +150,6 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_t *inode, struct iatt *stbuf, dict_t *xattr,
struct iatt *postparent)
{
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
int this_call_cnt = 0;
call_frame_t *prev = NULL;
@@ -164,7 +163,6 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
GF_VALIDATE_OR_GOTO ("dht", this->private, out);
GF_VALIDATE_OR_GOTO ("dht", cookie, out);
- conf = this->private;
local = frame->local;
prev = cookie;
@@ -553,7 +551,6 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_t *inode, struct iatt *buf, dict_t *xattr,
struct iatt *postparent)
{
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
int this_call_cnt = 0;
call_frame_t *prev = NULL;
@@ -570,8 +567,6 @@ dht_lookup_everywhere_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
GF_VALIDATE_OR_GOTO ("dht", cookie, out);
GF_VALIDATE_OR_GOTO ("dht", this->private, out);
- conf = this->private;
-
local = frame->local;
loc = &local->loc;
@@ -2962,13 +2957,11 @@ dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
off_t next_offset = 0;
int count = 0;
dht_layout_t *layout = 0;
- dht_conf_t *conf = NULL;
xlator_t *subvol = 0;
INIT_LIST_HEAD (&entries.list);
prev = cookie;
local = frame->local;
- conf = this->private;
if (op_ret < 0)
goto done;
@@ -3051,7 +3044,6 @@ dht_do_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t yoff, int whichop)
{
dht_local_t *local = NULL;
- dht_conf_t *conf = NULL;
int op_errno = -1;
xlator_t *xvol = NULL;
off_t xoff = 0;
@@ -3061,8 +3053,6 @@ dht_do_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (fd, err);
- conf = this->private;
-
local = dht_local_init (frame);
if (!local) {
@@ -3287,15 +3277,12 @@ dht_mknod (call_frame_t *frame, xlator_t *this,
int op_errno = -1;
int ret = -1;
xlator_t *avail_subvol = NULL;
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
VALIDATE_OR_GOTO (frame, err);
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (loc, err);
- conf = this->private;
-
dht_get_du_info (frame, this, loc);
local = dht_local_init (frame);
@@ -3499,10 +3486,8 @@ dht_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
call_frame_t *prev = NULL;
dht_layout_t *layout = NULL;
- dht_local_t *local = NULL;
prev = cookie;
- local = frame->local;
if (op_ret == -1)
goto out;
@@ -3711,7 +3696,6 @@ dht_create (call_frame_t *frame, xlator_t *this,
int op_errno = -1;
int ret = -1;
xlator_t *subvol = NULL;
- dht_conf_t *conf = NULL;
dht_local_t *local = NULL;
xlator_t *avail_subvol = NULL;
@@ -3719,8 +3703,6 @@ dht_create (call_frame_t *frame, xlator_t *this,
VALIDATE_OR_GOTO (this, err);
VALIDATE_OR_GOTO (loc, err);
- conf = this->private;
-
dht_get_du_info (frame, this, loc);
local = dht_local_init (frame);
@@ -3838,9 +3820,7 @@ dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int subvol_filled = 0;
call_frame_t *prev = NULL;
dht_layout_t *layout = NULL;
- dht_conf_t *conf = NULL;
- conf = this->private;
local = frame->local;
prev = cookie;
layout = local->layout;
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 745be4ce5b5..60008f2bd64 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -452,12 +452,10 @@ static int
rebalance_task (void *data)
{
int ret = -1;
- xlator_t *this = NULL;
dht_local_t *local = NULL;
call_frame_t *frame = NULL;
frame = data;
- this = THIS;
local = frame->local;
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index 538cfac952b..bdc4dd2b678 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -172,9 +172,7 @@ int
dht_rename_dir_do (call_frame_t *frame, xlator_t *this)
{
dht_local_t *local = NULL;
- dht_conf_t *conf = NULL;
- conf = this->private;
local = frame->local;
if (local->op_ret == -1)
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index ca41fd81d1b..882e0209eeb 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -786,7 +786,6 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
loc_t *loc, dht_layout_t *layout)
{
dht_local_t *local = NULL;
- uint32_t holes = 0;
uint32_t down = 0;
uint32_t misc = 0;
int ret = 0;
@@ -802,7 +801,6 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
&local->selfheal.down,
&local->selfheal.misc);
- holes = local->selfheal.hole_cnt;
down = local->selfheal.down;
misc = local->selfheal.misc;