summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorKaleb S KEITHLEY <kkeithle@redhat.com>2015-12-19 20:27:17 -0500
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-02-15 01:32:26 -0800
commitd4c415776b20e4152d4a706276cb06d833a58baa (patch)
treebc80178ddacf38aa3237ae37697b24b598d50b6e /xlators/mgmt
parent62f9659554c07317c9d06251b74171d9eac0917e (diff)
all: fixes for clang compile warnings
cli/src/cli-cmd-parser.c (chenk) cli/src/cli-xml-output.c (spandit) cli/src/cli.c (chenk) libglusterfs/src/common-utils.c (vmallika) libglusterfs/src/gfdb/gfdb_sqlite3.c (jfernand +1) rpc/rpc-transport/socket/src/socket.c (?) xlators/cluster/afr/src/afr-transaction.c (?) xlators/cluster/dht/src/dht-common.h (srangana +2) xlators/cluster/dht/src/dht-selfheal.c (srangana +2) xlators/debug/io-stats/src/io-stats.c (R. Wareing) xlators/features/barrier/src/barrier.c (vshastry) xlators/features/bit-rot/src/bitd/bit-rot-scrub.h (vshankar +1) xlators/features/shard/src/shard.c (kdhananj +1) xlators/mgmt/glusterd/src/glusterd-ganesha.c (skoduri) xlators/mgmt/glusterd/src/glusterd-handler.c (atinmu) xlators/mgmt/glusterd/src/glusterd-op-sm.h (atinmu) xlators/mgmt/glusterd/src/glusterd-snapshot.c (spandit) xlators/mgmt/glusterd/src/glusterd-syncop.c (atinmu) xlators/mgmt/glusterd/src/glusterd-volgen.c (atinmu) xlators/protocol/client/src/client-messages.h (mselvaga +1) xlators/storage/bd/src/bd-helper.c (M. Mohan Kumar) xlators/storage/bd/src/bd.c (M. Mohan Kumar) xlators/storage/posix/src/posix.c (nbalacha +1) Change-Id: I85934fbcaf485932136ef3acd206f6ebecde61dd BUG: 1293133 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13031 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.h3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c2
7 files changed, 11 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index d5e521d90bb..de1c33df5bf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -240,7 +240,7 @@ glusterd_op_stage_set_ganesha (dict_t *dict, char **op_errstr)
int ret = -1;
char *volname = NULL;
int exists = 0;
- gf_boolean_t value = _gf_false;
+ int value = -1;
gf_boolean_t option = _gf_false;
char *str = NULL;
int dict_count = 0;
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index c86587f6fbf..4a81ce25085 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -856,7 +856,7 @@ __glusterd_handle_cluster_lock (rpcsvc_request_t *req)
int32_t ret = -1;
gd1_mgmt_cluster_lock_req lock_req = {{0},};
glusterd_op_lock_ctx_t *ctx = NULL;
- glusterd_op_t op = GD_OP_EVENT_LOCK;
+ glusterd_op_sm_event_type_t op = GD_OP_EVENT_LOCK;
glusterd_op_info_t txn_op_info = {{0},};
glusterd_conf_t *priv = NULL;
uuid_t *txn_id = NULL;
@@ -947,9 +947,9 @@ glusterd_handle_cluster_lock (rpcsvc_request_t *req)
__glusterd_handle_cluster_lock);
}
-int
+static int
glusterd_req_ctx_create (rpcsvc_request_t *rpc_req,
- glusterd_op_t op, uuid_t uuid,
+ int op, uuid_t uuid,
char *buf_val, size_t buf_len,
gf_gld_mem_types_t mem_type,
glusterd_req_ctx_t **req_ctx_out)
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 076ae8ef56b..ea1400d7637 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -145,7 +145,7 @@ glusterd_txn_opinfo_dict_fini ()
void
glusterd_txn_opinfo_init (glusterd_op_info_t *opinfo,
- glusterd_op_sm_state_info_t *state, glusterd_op_t *op,
+ glusterd_op_sm_state_info_t *state, int *op,
dict_t *op_ctx, rpcsvc_request_t *req)
{
glusterd_conf_t *conf = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
index 454181d188f..19b1bd97e04 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
@@ -91,7 +91,8 @@ struct glusterd_op_info_ {
int32_t pending_count;
int32_t brick_pending_count;
int32_t op_count;
- glusterd_op_t op;
+ /* op is an enum, glusterd_op_t or glusterd_op_sm_state_info_t */
+ int op;
struct cds_list_head op_peers;
void *op_ctx;
rpcsvc_request_t *req;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index cb1c8e951e5..e2b0ea21501 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -1196,7 +1196,7 @@ snap_max_hard_limits_validate (dict_t *dict, char *volname,
max_limit = opt_hard_max;
}
- if ((value < 0) || (value > max_limit)) {
+ if (value > max_limit) {
ret = -1;
snprintf (err_str, PATH_MAX, "Invalid snap-max-hard-limit "
"%"PRIu64 ". Expected range 1 - %"PRIu64,
@@ -1289,7 +1289,7 @@ glusterd_snapshot_config_prevalidate (dict_t *dict, char **op_errstr,
if (soft_limit) {
max_limit = GLUSTERD_SNAPS_MAX_SOFT_LIMIT_PERCENT;
- if ((soft_limit < 0) || (soft_limit > max_limit)) {
+ if (soft_limit > max_limit) {
ret = -1;
snprintf (err_str, PATH_MAX, "Invalid "
"snap-max-soft-limit ""%"
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index a0b856160c9..ac4870d516c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -1720,7 +1720,7 @@ gd_sync_task_begin (dict_t *op_ctx, rpcsvc_request_t * req)
int op_ret = -1;
dict_t *req_dict = NULL;
glusterd_conf_t *conf = NULL;
- glusterd_op_t op = 0;
+ glusterd_op_t op = GD_OP_NONE;
int32_t tmp_op = 0;
char *op_errstr = NULL;
char *tmp = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 3df4b3556cf..c808b07cbf2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3906,7 +3906,7 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char *tmp = NULL;
gf_boolean_t var = _gf_false;
gf_boolean_t ob = _gf_false;
- gf_boolean_t uss_enabled = _gf_false;
+ int uss_enabled = -1;
xlator_t *this = THIS;
GF_ASSERT (this);