diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2016-08-22 13:22:03 -0400 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-09-05 06:08:09 -0700 |
commit | c67386e1e8edcbdf2f8dca06fc7984df2adb1f06 (patch) | |
tree | 79ef8b5b8365f8fdfd897d334a3560e37943cf22 | |
parent | 9c057750310b7e296624746bfeb909690320a2b3 (diff) |
glusterd (server-quorum): 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: I53961a9ddbba824ea3cfa00abbba20109da5de89
BUG: 1369124
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15276
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: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-server-quorum.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c index 35f6ad19f71..606d33e8c5d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c +++ b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c @@ -142,6 +142,9 @@ glusterd_is_quorum_changed (dict_t *options, char *option, char *value) char *newquorum = NULL; char *oldratio = NULL; char *newratio = NULL; + xlator_t *this = NULL; + + this = THIS; if ((strcmp ("all", option) != 0) && !glusterd_is_quorum_option (option)) @@ -154,12 +157,22 @@ glusterd_is_quorum_changed (dict_t *options, char *option, char *value) newquorum = value; ret = dict_get_str (options, GLUSTERD_QUORUM_TYPE_KEY, &oldquorum); + if (ret) + gf_msg (this->name, GF_LOG_DEBUG, 0, + GD_MSG_DICT_GET_FAILED, + "dict_get_str failed on %s", + GLUSTERD_QUORUM_TYPE_KEY); } if (all || (strcmp (GLUSTERD_QUORUM_RATIO_KEY, option) == 0)) { newratio = value; ret = dict_get_str (options, GLUSTERD_QUORUM_RATIO_KEY, &oldratio); + if (ret) + gf_msg (this->name, GF_LOG_DEBUG, 0, + GD_MSG_DICT_GET_FAILED, + "dict_get_str failed on %s", + GLUSTERD_QUORUM_RATIO_KEY); } reconfigured = _gf_true; @@ -277,10 +290,8 @@ does_gd_meet_server_quorum (xlator_t *this) int quorum_count = 0; int active_count = 0; gf_boolean_t in = _gf_false; - glusterd_conf_t *conf = NULL; int ret = -1; - conf = this->private; ret = glusterd_get_quorum_cluster_counts (this, &active_count, &quorum_count); if (ret) @@ -300,11 +311,9 @@ glusterd_do_volume_quorum_action (xlator_t *this, glusterd_volinfo_t *volinfo, gf_boolean_t meets_quorum) { glusterd_brickinfo_t *brickinfo = NULL; - glusterd_conf_t *conf = NULL; gd_quorum_status_t quorum_status = NOT_APPLICABLE_QUORUM; gf_boolean_t follows_quorum = _gf_false; - conf = this->private; if (volinfo->status != GLUSTERD_STATUS_STARTED) { volinfo->quorum_status = NOT_APPLICABLE_QUORUM; goto out; |