summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
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 /libglusterfs/src/common-utils.c
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 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index a9e74cb895a..cf5b524dc12 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1581,11 +1581,12 @@ err:
}
int
-gf_string2bytesize_range (const char *str, uint64_t *n, uint64_t max)
+gf_string2bytesize_range (const char *str, uint64_t *n, uint64_t umax)
{
double value = 0.0;
- uint64_t int_value = 0;
+ int64_t int_value = 0;
uint64_t unit = 0;
+ int64_t max = 0;
char *tail = NULL;
int old_errno = 0;
const char *s = NULL;
@@ -1598,6 +1599,8 @@ gf_string2bytesize_range (const char *str, uint64_t *n, uint64_t max)
return -1;
}
+ max = umax & 0x7fffffffffffffffLL;
+
for (s = str; *s != '\0'; s++) {
if (isspace (*s))
continue;
@@ -2114,7 +2117,7 @@ get_nth_word (const char *str, int n)
if (!end)
goto out;
- word_len = abs (end - start);
+ word_len = labs (end - start);
word = GF_CALLOC (1, word_len + 1, gf_common_mt_strdup);
if (!word)