summaryrefslogtreecommitdiffstats
path: root/xlators/features/snapview-server/src
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2016-08-22 12:12:12 -0400
committerRajesh Joseph <rjoseph@redhat.com>2016-09-12 09:19:46 -0700
commit7c5220a138c0add5f245254a555c97b2f1a4df2f (patch)
tree9fef947eeb080a45d9bd522bd2bcf4b9070011be /xlators/features/snapview-server/src
parent5cd7ec1372e119cc037b2182287ca7eb165e9e89 (diff)
snapview-server: fix unused variable warnings/errors
http://review.gluster.org/14085 fixes a/the "leak" - via the generated rpc/xdr headers - of pragmas that mask these warnings. However 14085 won't pass the smoke test until all the warnings are fixed. Change-Id: I74cf7adf943f71e0de8d8f487db3cd2394ce16e8 BUG: 1369124 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/15251 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/features/snapview-server/src')
-rw-r--r--xlators/features/snapview-server/src/snapview-server-helpers.c5
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c21
2 files changed, 2 insertions, 24 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server-helpers.c b/xlators/features/snapview-server/src/snapview-server-helpers.c
index 5bf41c2317b..6f305dbc2fb 100644
--- a/xlators/features/snapview-server/src/snapview-server-helpers.c
+++ b/xlators/features/snapview-server/src/snapview-server-helpers.c
@@ -334,12 +334,11 @@ svs_uuid_generate (uuid_t gfid, char *snapname, uuid_t origin_gfid)
{
unsigned char md5_sum[MD5_DIGEST_LENGTH] = {0};
char ino_string[NAME_MAX + 32] = "";
- int ret = 0;
GF_ASSERT (snapname);
- ret = snprintf (ino_string, sizeof (ino_string), "%s%s",
- snapname, uuid_utoa(origin_gfid));
+ (void) snprintf (ino_string, sizeof (ino_string), "%s%s",
+ snapname, uuid_utoa(origin_gfid));
MD5((unsigned char *)ino_string, strlen(ino_string), md5_sum);
gf_uuid_copy (gfid, md5_sum);
}
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 72cfc908bba..ad169b2466d 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -405,7 +405,6 @@ svs_revalidate (xlator_t *this, loc_t *loc, inode_t *parent,
int ret = -1;
char tmp_uuid[64] = {0, };
glfs_t *fs = NULL;
- glfs_object_t *object = NULL;
GF_VALIDATE_OR_GOTO ("snapview-server", this, out);
GF_VALIDATE_OR_GOTO (this->name, buf, out);
@@ -445,7 +444,6 @@ svs_revalidate (xlator_t *this, loc_t *loc, inode_t *parent,
*/
if (inode_ctx->fs && inode_ctx->object) {
fs = inode_ctx->fs;
- object = inode_ctx->object;
SVS_CHECK_VALID_SNAPSHOT_HANDLE(fs, this);
if (fs) {
memcpy (buf, &inode_ctx->buf, sizeof (*buf));
@@ -510,7 +508,6 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
svs_inode_t *inode_ctx = NULL;
svs_inode_t *parent_ctx = NULL;
int32_t ret = -1;
- svs_private_t *private = NULL;
inode_t *parent = NULL;
snap_dirent_t *dirent = NULL;
gf_boolean_t entry_point_key = _gf_false;
@@ -522,8 +519,6 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
GF_VALIDATE_OR_GOTO (this->name, loc, out);
GF_VALIDATE_OR_GOTO (this->name, loc->inode, out);
- private = this->private;
-
/* For lookups sent on inodes (i.e not parent inode + basename, but
direct inode itself which usually is a nameless lookup or revalidate
on the inode), loc->name will not be there. Get it from path if
@@ -1541,7 +1536,6 @@ int32_t
svs_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t off, dict_t *xdata)
{
- svs_private_t *priv = NULL;
gf_dirent_t entries = {{{0, }, }, };
int count = 0;
svs_inode_t *inode_ctx = NULL;
@@ -1557,8 +1551,6 @@ svs_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
GF_VALIDATE_OR_GOTO (this->name, fd, unwind);
GF_VALIDATE_OR_GOTO (this->name, fd->inode, unwind);
- priv = this->private;
-
inode_ctx = svs_inode_ctx_get (this, fd->inode);
if (!inode_ctx) {
gf_log (this->name, GF_LOG_ERROR, "inode context not found in "
@@ -1720,7 +1712,6 @@ out:
int32_t
svs_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
- svs_private_t *priv = NULL;
struct iatt buf = {0, };
int32_t op_errno = EINVAL;
int32_t op_ret = -1;
@@ -1735,8 +1726,6 @@ svs_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
GF_VALIDATE_OR_GOTO (this->name, loc, out);
GF_VALIDATE_OR_GOTO (this->name, loc->inode, out);
- priv = this->private;
-
/* Instead of doing the check of whether it is a entry point directory
or not by checking the name of the entry and then deciding what
to do, just check the inode context and decide what to be done.
@@ -1784,7 +1773,6 @@ out:
int32_t
svs_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
- svs_private_t *priv = NULL;
struct iatt buf = {0, };
int32_t op_errno = EINVAL;
int32_t op_ret = -1;
@@ -1799,8 +1787,6 @@ svs_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
GF_VALIDATE_OR_GOTO (this->name, fd, out);
GF_VALIDATE_OR_GOTO (this->name, fd->inode, out);
- priv = this->private;
-
/* Instead of doing the check of whether it is a entry point directory
or not by checking the name of the entry and then deciding what
to do, just check the inode context and decide what to be done.
@@ -1854,7 +1840,6 @@ out:
int32_t
svs_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
- svs_private_t *priv = NULL;
struct statvfs buf = {0, };
int32_t op_errno = EINVAL;
int32_t op_ret = -1;
@@ -1868,8 +1853,6 @@ svs_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
GF_VALIDATE_OR_GOTO (this->name, loc, out);
GF_VALIDATE_OR_GOTO (this->name, loc->inode, out);
- priv = this->private;
-
/* Instead of doing the check of whether it is a entry point directory
or not by checking the name of the entry and then deciding what
to do, just check the inode context and decide what to be done.
@@ -2125,7 +2108,6 @@ svs_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int mask,
int ret = -1;
int32_t op_ret = -1;
int32_t op_errno = EINVAL;
- svs_private_t *priv = NULL;
glfs_t *fs = NULL;
glfs_object_t *object = NULL;
svs_inode_t *inode_ctx = NULL;
@@ -2137,8 +2119,6 @@ svs_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int mask,
GF_VALIDATE_OR_GOTO (this->name, loc, out);
GF_VALIDATE_OR_GOTO (this->name, loc->inode, out);
- priv = this->private;
-
inode_ctx = svs_inode_ctx_get (this, loc->inode);
if (!inode_ctx) {
gf_log (this->name, GF_LOG_ERROR, "inode context not found for"
@@ -2226,7 +2206,6 @@ init (xlator_t *this)
{
svs_private_t *priv = NULL;
int ret = -1;
- pthread_t snap_thread;
/* This can be the top of graph in certain cases */
if (!this->parents) {