summaryrefslogtreecommitdiffstats
path: root/cli/src
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 /cli/src
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 'cli/src')
-rw-r--r--cli/src/cli-cmd-parser.c4
-rw-r--r--cli/src/cli-xml-output.c41
-rw-r--r--cli/src/cli.c5
3 files changed, 26 insertions, 24 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 69b94863c15..9439724f3df 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2834,8 +2834,8 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
int32_t list_cnt = -1;
int index = 0;
int perf = 0;
- int32_t blk_size = 0;
- uint32_t count = 0;
+ int32_t blk_size = 0;
+ int count = 0;
gf_boolean_t nfs = _gf_false;
char *delimiter = NULL;
char *opwords[] = { "open", "read", "write", "opendir",
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index f7ae0578b15..0f501782f25 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -6258,37 +6258,37 @@ cli_quota_xml_output (cli_local_t *local, char *path, int64_t hl_str,
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"path",
- "%s", path);
+ (xmlChar *)"path",
+ "%s", path);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"hard_limit",
+ (xmlChar *)"hard_limit",
!limit_set ? "N/A" :
- "%"PRIu64, hl_str);
+ "%"PRId64, hl_str);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_percent",
+ (xmlChar *)"soft_limit_percent",
!limit_set ? "N/A" :
"%s", sl_final);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_value",
+ (xmlChar *)"soft_limit_value",
!limit_set ? "N/A" :
- "%"PRIu64, sl_num);
+ "%"PRId64, sl_num);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
(xmlChar *)"used_space",
- "%"PRIu64, used);
+ "%"PRId64, used);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
(xmlChar *)"avail_space",
!limit_set ? "N/A" :
- "%"PRIu64, avail);
+ "%"PRId64, avail);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
@@ -6327,51 +6327,52 @@ cli_quota_object_xml_output (cli_local_t *local, char *path, char *sl_str,
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"path",
+ (xmlChar *)"path",
"%s", path);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"hard_limit",
+ (xmlChar *)"hard_limit",
!limit_set ? "N/A" :
- "%"PRIu64, limits->hl);
+ "%"PRId64, limits->hl);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_percent",
+ (xmlChar *)"soft_limit_percent",
!limit_set ? "N/A" :
"%s", sl_str);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_value",
+ (xmlChar *)"soft_limit_value",
!limit_set ? "N/A" :
"%"PRIu64, sl_val);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"file_count",
- "%"PRIu64,
+ (xmlChar *)"file_count",
+ "%"PRId64,
used_space->file_count);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"dir_count", "%"PRIu64,
+ (xmlChar *)"dir_count",
+ "%"PRIu64,
used_space->dir_count);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"available",
+ (xmlChar *)"available",
!limit_set ? "N/A" :
- "%"PRIu64, avail);
+ "%"PRId64, avail);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"sl_exceeded",
+ (xmlChar *)"sl_exceeded",
!limit_set ? "N/A" :
"%s", sl);
XML_RET_CHECK_AND_GOTO (ret, out);
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 118a94f0b41..fbf3e89fb78 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -363,9 +363,10 @@ cli_opt_parse (char *opt, struct cli_state *state)
oarg = strtail (opt, "log-level=");
if (oarg) {
- state->log_level = glusterd_check_log_level(oarg);
- if (state->log_level == -1)
+ int log_level = glusterd_check_log_level(oarg);
+ if (log_level == -1)
return -1;
+ state->log_level = (gf_loglevel_t) log_level;
return 0;
}