summaryrefslogtreecommitdiffstats
path: root/xlators/system
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-10-18 10:30:42 +0530
committerAnand Avati <avati@gluster.com>2011-10-20 04:13:50 -0700
commit84ebee8c20ce667a5ec5fddc0aa47f8b5bef39f8 (patch)
treef38e977ced3c0b2d6e8c47d3aeeea4bdc3fce208 /xlators/system
parent26a51e5e6ec1639a7601c0fc373fd9f6493b014a (diff)
build: warning suppression (round n)
with this patch, there are no more warnings with gcc (GCC) 4.6.1 20110908 Change-Id: Ice0d52d304b9846395f8a4a191c98eb53125f792 BUG: 2550 Reviewed-on: http://review.gluster.com/607 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/system')
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index 7a80d11..a0a4713 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -171,7 +171,6 @@ static int
acl_permits (call_frame_t *frame, inode_t *inode, int want)
{
int verdict = 0;
- int ret = 0;
struct posix_acl *acl = NULL;
struct posix_ace *ace = NULL;
struct posix_acl_ctx *ctx = NULL;
@@ -190,8 +189,7 @@ acl_permits (call_frame_t *frame, inode_t *inode, int want)
if (frame_is_super_user (frame))
goto green;
- ret = posix_acl_get (inode, frame->this, &acl, NULL);
-
+ posix_acl_get (inode, frame->this, &acl, NULL);
if (!acl) {
acl = posix_acl_ref (frame->this, conf->minimal_acl);
}
@@ -723,7 +721,9 @@ acl_set:
posix_acl_ctx_update (inode, this, buf);
ret = posix_acl_set (inode, this, acl_access, acl_default);
-
+ if (ret)
+ gf_log (this->name, GF_LOG_WARNING,
+ "failed to set ACL in context");
unwind:
my_xattr = frame->local;
frame->local = NULL;
@@ -769,7 +769,14 @@ green:
}
ret = dict_set_int8 (my_xattr, POSIX_ACL_ACCESS_XATTR, 0);
+ if (ret)
+ gf_log (this->name, GF_LOG_WARNING, "failed to set key %s",
+ POSIX_ACL_ACCESS_XATTR);
+
ret = dict_set_int8 (my_xattr, POSIX_ACL_DEFAULT_XATTR, 0);
+ if (ret)
+ gf_log (this->name, GF_LOG_WARNING, "failed to set key %s",
+ POSIX_ACL_DEFAULT_XATTR);
frame->local = my_xattr;
STACK_WIND (frame, posix_acl_lookup_cbk,
@@ -1644,7 +1651,6 @@ posix_acl_setxattr_update (xlator_t *this, inode_t *inode, dict_t *xattr)
struct posix_acl *old_default = NULL;
struct posix_acl_ctx *ctx = NULL;
int ret = 0;
- mode_t mode = 0;
ctx = posix_acl_ctx_get (inode, this);
if (!ctx)
@@ -1663,7 +1669,7 @@ posix_acl_setxattr_update (xlator_t *this, inode_t *inode, dict_t *xattr)
ret = posix_acl_set (inode, this, acl_access, acl_default);
if (acl_access && acl_access != old_access) {
- mode = posix_acl_access_set_mode (acl_access, ctx);
+ posix_acl_access_set_mode (acl_access, ctx);
}
if (acl_access)
@@ -1675,7 +1681,7 @@ posix_acl_setxattr_update (xlator_t *this, inode_t *inode, dict_t *xattr)
if (old_default)
posix_acl_unref (this, old_default);
- return 0;
+ return ret;
}