diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2016-09-13 05:57:32 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-12-18 04:57:49 -0800 |
commit | 45431070d742ac9398b41efd23c1ea500a639669 (patch) | |
tree | f8922eb930979d0b348351ce552e088f827d848f /xlators | |
parent | 88a096ed0952ee2ae8e8684c99aadd2c1f3f9e5e (diff) |
protocol/client: fix op_errno handling, was unused variable
Backport of: http://review.gluster.org/15482
see comment in patch set one. Match the general logic flow of the
other fop-cbks and eliminate the unused variable and its associated
warning
also see comment in patch set seven, re: correct handling of
client_process_response(); and the associated BZ
https://bugzilla.redhat.com/show_bug.cgi?id=1376328
http://review.gluster.org/14085 fixes a "pragma leak" where the
generated rpc/xdr headers have a pair of pragmas that disable these
warnings. With the warnings disabled, many unused variables have
crept into the code base.
And 14085 won't pass its own smoke test until all these warnings are
fixed.
Change-Id: I9958a70b56023258921960410f9b641505fd4387
BUG: 1405308
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/16161
Tested-by: Krutika Dhananjay <kdhananj@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c index a7b88baa8bb..70d82c3ecc8 100644 --- a/xlators/protocol/client/src/client-rpc-fops.c +++ b/xlators/protocol/client/src/client-rpc-fops.c @@ -3165,7 +3165,6 @@ client3_3_compound_cbk (struct rpc_req *req, struct iovec *iov, int count, xlator_t *this = NULL; dict_t *xdata = NULL; clnt_local_t *local = NULL; - int op_errno = 0; int i = 0; int length = 0; int ret = -1; @@ -3176,7 +3175,8 @@ client3_3_compound_cbk (struct rpc_req *req, struct iovec *iov, int count, local = frame->local; if (-1 == req->rpc_status) { - op_errno = ENOTCONN; + rsp.op_ret = -1; + rsp.op_errno = ENOTCONN; goto out; } @@ -3184,7 +3184,8 @@ client3_3_compound_cbk (struct rpc_req *req, struct iovec *iov, int count, if (ret < 0) { gf_msg (this->name, GF_LOG_ERROR, EINVAL, PC_MSG_XDR_DECODING_FAILED, "XDR decoding failed"); - op_errno = EINVAL; + rsp.op_ret = -1; + rsp.op_errno = EINVAL; goto out; } @@ -3196,15 +3197,18 @@ client3_3_compound_cbk (struct rpc_req *req, struct iovec *iov, int count, args_cbk = compound_args_cbk_alloc (length, xdata); if (!args_cbk) { - op_errno = ENOMEM; + rsp.op_ret = -1; + rsp.op_errno = ENOMEM; goto out; } + /* TODO: see https://bugzilla.redhat.com/show_bug.cgi?id=1376328 */ for (i = 0; i < args_cbk->fop_length; i++) { ret = client_process_response (frame, this, req, &rsp, args_cbk, i); if (ret) { - op_errno = -ret; + rsp.op_ret = -1; + rsp.op_errno = -ret; goto out; } |