From 657d89a6a0e1f3e97299811cf50cf59785a1328b Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sun, 18 Jan 2015 00:01:25 +0100 Subject: sdsfromlonglong: Cast abs ternary statement to ull Fixes the warning about the ternary statement changing the signedness of value. --- src/sds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sds.c b/src/sds.c index 6573634..35132a9 100644 --- a/src/sds.c +++ b/src/sds.c @@ -531,7 +531,7 @@ sds sdsfromlonglong(long long value) { char buf[32], *p; unsigned long long v; - v = (value < 0) ? -value : value; + v = (unsigned long long)((value < 0) ? -value : value); p = buf+31; /* point to the last character */ do { *p-- = '0'+(v%10); -- cgit v1.2.3-54-g00ecf