summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.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/features/marker/src/marker-quota.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/features/marker/src/marker-quota.c')
-rw-r--r--xlators/features/marker/src/marker-quota.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index fc1f3a71b92..ebe205fc604 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -281,15 +281,12 @@ mark_inode_undirty (call_frame_t *frame, void *cookie, xlator_t *this,
int64_t *size = NULL;
dict_t *newdict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = (quota_local_t *) frame->local;
if (op_ret == -1)
goto err;
- priv = (marker_conf_t *) this->private;
-
if (!dict)
goto wind;
@@ -341,15 +338,12 @@ update_size_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
int64_t *size = NULL;
int64_t *delta = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
if (op_ret == -1)
goto err;
- priv = this->private;
-
if (dict == NULL) {
gf_log (this->name, GF_LOG_WARNING,
"Dict is null while updating the size xattr %s",
@@ -429,12 +423,9 @@ get_dirty_inode_size (call_frame_t *frame, xlator_t *this)
int32_t ret = -1;
dict_t *dict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = (quota_local_t *) frame->local;
- priv = (marker_conf_t *) this->private;
-
dict = dict_new ();
if (!dict) {
ret = -1;
@@ -730,7 +721,6 @@ check_if_still_dirty (call_frame_t *frame,
int32_t ret = -1;
fd_t *fd = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
@@ -740,8 +730,6 @@ check_if_still_dirty (call_frame_t *frame,
goto err;
}
- priv = this->private;
-
if (!dict) {
ret = -1;
goto err;
@@ -790,15 +778,12 @@ get_dirty_xattr (call_frame_t *frame, void *cookie,
int32_t ret = -1;
dict_t *xattr_req = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
if (op_ret == -1) {
dirty_inode_updation_done (frame, NULL, this, 0, 0);
return 0;
}
- priv = (marker_conf_t *) this->private;
-
local = frame->local;
xattr_req = dict_new ();
@@ -947,7 +932,6 @@ create_dirty_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t ret = -1;
dict_t *newdict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
if (op_ret < 0) {
goto err;
@@ -955,8 +939,6 @@ create_dirty_xattr (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
- priv = (marker_conf_t *) this->private;
-
if (local->loc.inode->ia_type == IA_IFDIR) {
newdict = dict_new ();
if (!newdict) {
@@ -999,7 +981,6 @@ quota_create_xattr (xlator_t *this, call_frame_t *frame)
dict_t *dict = NULL;
char key[512] = {0, };
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contri = NULL;
@@ -1008,8 +989,6 @@ quota_create_xattr (xlator_t *this, call_frame_t *frame)
local = frame->local;
- priv = (marker_conf_t *) this->private;
-
ret = quota_inode_ctx_get (local->loc.inode, this, &ctx);
if (ret < 0) {
ctx = quota_inode_ctx_new (local->loc.inode, this);
@@ -1081,7 +1060,6 @@ quota_check_n_set_inode_xattr (call_frame_t *frame, void *cookie,
quota_local_t *local = NULL;
int64_t *size = NULL, *contri = NULL;
int8_t dirty = 0;
- marker_conf_t *priv = NULL;
int32_t ret = 0;
char contri_key[512] = {0, };
@@ -1090,7 +1068,6 @@ quota_check_n_set_inode_xattr (call_frame_t *frame, void *cookie,
}
local = frame->local;
- priv = this->private;
ret = dict_get_bin (dict, QUOTA_SIZE_KEY, (void **) &size);
if (ret < 0)
@@ -1400,7 +1377,6 @@ quota_mark_undirty (call_frame_t *frame,
dict_t *newdict = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
@@ -1412,8 +1388,6 @@ quota_mark_undirty (call_frame_t *frame,
goto err;
}
- priv = this->private;
-
//update the size of the parent inode
if (dict != NULL) {
ret = quota_inode_ctx_get (local->parent_loc.inode, this, &ctx);
@@ -1482,7 +1456,6 @@ quota_update_parent_size (call_frame_t *frame,
int64_t *size = NULL;
int32_t ret = -1;
dict_t *newdict = NULL;
- marker_conf_t *priv = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
@@ -1506,8 +1479,6 @@ quota_update_parent_size (call_frame_t *frame,
local->loc.path, local->ctx->size,
local->contri->contribution);
- priv = this->private;
-
if (dict == NULL) {
op_errno = EINVAL;
goto err;
@@ -1571,7 +1542,6 @@ quota_update_inode_contribution (call_frame_t *frame, void *cookie,
dict_t *newdict = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
- marker_conf_t *priv = NULL;
inode_contribution_t *contribution = NULL;
local = frame->local;
@@ -1584,8 +1554,6 @@ quota_update_inode_contribution (call_frame_t *frame, void *cookie,
goto err;
}
- priv = this->private;
-
ctx = local->ctx;
contribution = local->contri;
@@ -1691,7 +1659,6 @@ quota_fetch_child_size_and_contri (call_frame_t *frame, void *cookie,
char contri_key [512] = {0, };
dict_t *newdict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
quota_inode_ctx_t *ctx = NULL;
local = frame->local;
@@ -1709,8 +1676,6 @@ quota_fetch_child_size_and_contri (call_frame_t *frame, void *cookie,
gf_log (this->name, GF_LOG_DEBUG, "%s marked dirty", local->parent_loc.path);
- priv = this->private;
-
//update parent ctx
ret = quota_inode_ctx_get (local->parent_loc.inode, this, &ctx);
if (ret == -1) {
@@ -1781,7 +1746,6 @@ quota_markdirty (call_frame_t *frame, void *cookie,
int32_t ret = -1;
dict_t *dict = NULL;
quota_local_t *local = NULL;
- marker_conf_t *priv = NULL;
local = frame->local;
@@ -1802,8 +1766,6 @@ quota_markdirty (call_frame_t *frame, void *cookie,
gf_log (this->name, GF_LOG_TRACE,
"inodelk succeeded on %s", local->parent_loc.path);
- priv = this->private;
-
dict = dict_new ();
if (!dict) {
ret = -1;
@@ -1989,13 +1951,10 @@ inspect_directory_xattr (xlator_t *this,
int64_t *size = NULL, size_int = 0;
int64_t *contri = NULL, contri_int = 0;
char contri_key [512] = {0, };
- marker_conf_t *priv = NULL;
gf_boolean_t not_root = _gf_false;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contribution = NULL;
- priv = this->private;
-
ret = quota_inode_ctx_get (loc->inode, this, &ctx);
if (ret < 0) {
ctx = quota_inode_ctx_new (loc->inode, this);
@@ -2079,12 +2038,9 @@ inspect_file_xattr (xlator_t *this,
uint64_t contri_int = 0, size = 0;
int64_t *contri_ptr = NULL;
char contri_key [512] = {0, };
- marker_conf_t *priv = NULL;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contribution = NULL;
- priv = this->private;
-
ret = quota_inode_ctx_get (loc->inode, this, &ctx);
if (ret < 0) {
ctx = quota_inode_ctx_new (loc->inode, this);
@@ -2159,14 +2115,11 @@ quota_req_xattr (xlator_t *this,
dict_t *dict)
{
int32_t ret = -1;
- marker_conf_t *priv = NULL;
GF_VALIDATE_OR_GOTO ("marker", this, out);
GF_VALIDATE_OR_GOTO ("marker", loc, out);
GF_VALIDATE_OR_GOTO ("marker", dict, out);
- priv = this->private;
-
//if not "/" then request contribution
if (strcmp (loc->path, "/") == 0)
goto set_size;
@@ -2305,9 +2258,7 @@ mq_reduce_parent_size_xattr (call_frame_t *frame, void *cookie,
int32_t ret = -1;
int64_t *size = NULL;
dict_t *dict = NULL;
- marker_conf_t *priv = NULL;
quota_local_t *local = NULL;
- inode_contribution_t *contribution = NULL;
local = frame->local;
if (op_ret == -1) {
@@ -2319,10 +2270,6 @@ mq_reduce_parent_size_xattr (call_frame_t *frame, void *cookie,
VALIDATE_OR_GOTO (local->contri, err);
- priv = this->private;
-
- contribution = local->contri;
-
dict = dict_new ();
if (dict == NULL) {
ret = -1;
@@ -2358,7 +2305,6 @@ reduce_parent_size (xlator_t *this, loc_t *loc, int64_t contri)
int32_t ret = -1;
struct gf_flock lock = {0,};
call_frame_t *frame = NULL;
- marker_conf_t *priv = NULL;
quota_local_t *local = NULL;
quota_inode_ctx_t *ctx = NULL;
inode_contribution_t *contribution = NULL;
@@ -2366,8 +2312,6 @@ reduce_parent_size (xlator_t *this, loc_t *loc, int64_t contri)
GF_VALIDATE_OR_GOTO ("marker", this, out);
GF_VALIDATE_OR_GOTO ("marker", loc, out);
- priv = this->private;
-
ret = quota_inode_ctx_get (loc->inode, this, &ctx);
if (ret < 0)
goto out;