diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2013-08-09 21:32:59 +0530 |
---|---|---|
committer | Krutika Dhananjay <kdhananj@redhat.com> | 2013-08-09 21:37:21 +0530 |
commit | 36fd69fa17f2d5a9bf4bab0b20b24912ea7389b5 (patch) | |
tree | b8ad52eaded8901568c7e4f9c7de17617b896f00 | |
parent | a3bcd5bc095a636f2e23da8bb0e08ba17faa2738 (diff) |
features/quota: Fix compilation warnings
The following are the compilation warnings I encountered:
-----------------------------------
In file included from quota.c:12:0:
quota.h:190:1: error: 'packed' attribute ignored [-Werror=attributes]
quota.c: In function 'quota_lookup_cbk':
quota.c:618:23: error: assignment from incompatible pointer type [-Werror]
quota.c:637:53: error: 'soft_lim' undeclared (first use in this function)
quota.c:637:53: note: each undeclared identifier is reported only once for each function it appears in
quota.c:608:28: error: unused variable 'size' [-Werror=unused-variable]
cc1: all warnings being treated as errors
-----------------------------------
Change-Id: I7a09e654a9cc064a423a5f8362f2a9c6abbc7edb
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
-rw-r--r-- | xlators/features/quota/src/quota.c | 7 | ||||
-rw-r--r-- | xlators/features/quota/src/quota.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 0f335283..5f7c67ce 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -605,9 +605,8 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, quota_inode_ctx_t *ctx = NULL; quota_dentry_t *dentry = NULL; uint64_t value = 0; - int64_t *size = NULL; - quota_limit_t *limit = NULL; - int64_t hard_lim = -1, soft_lim_percent = -1, *ptr = NULL; + quota_limit_t *limit = NULL, *ptr = NULL; + int64_t hard_lim = -1, soft_lim_percent = -1; quota_local_t *local = NULL; if (op_ret < 0) @@ -634,7 +633,7 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, goto unwind; } - ret = quota_inode_ctx_get (inode, hard_lim, soft_lim, + ret = quota_inode_ctx_get (inode, hard_lim, soft_lim_percent, this, dict, buf, &ctx, 1); if ((ret == -1) || (ctx == NULL)) { gf_log (this->name, GF_LOG_WARNING, "cannot create quota " diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h index c4d5c6ad..3a7a47f2 100644 --- a/xlators/features/quota/src/quota.h +++ b/xlators/features/quota/src/quota.h @@ -187,7 +187,7 @@ typedef struct quota_priv quota_priv_t; typedef struct quota_limit { int64_t hard_lim; int64_t soft_lim_percent; -} quota_limit_t __attribute__ ((packed)); +} __attribute__ ((packed)) quota_limit_t ; int quota_enforcer_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, |