summaryrefslogtreecommitdiff
path: root/src/hyperloglog.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-08-13 11:44:38 +0200
committerantirez <antirez@gmail.com>2014-08-13 11:44:38 +0200
commitedca2b14d213c31da9e7a919f6b898f3ea8abea8 (patch)
tree4e4693dd041c259faec00b40a339157e33cac10e /src/hyperloglog.c
parent7e3ccddc6d728250dd473c1ab4348d899ab69eb3 (diff)
downloadredis-edca2b14d213c31da9e7a919f6b898f3ea8abea8.tar.gz
Remove warnings and improve integer sign correctness.
Diffstat (limited to 'src/hyperloglog.c')
-rw-r--r--src/hyperloglog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c
index 63052a789..005beb18f 100644
--- a/src/hyperloglog.c
+++ b/src/hyperloglog.c
@@ -1349,7 +1349,7 @@ void pfmergeCommand(redisClient *c) {
* Something that is not easy to test from within the outside. */
#define HLL_TEST_CYCLES 1000
void pfselftestCommand(redisClient *c) {
- int j, i;
+ unsigned int j, i;
sds bitcounters = sdsnewlen(NULL,HLL_DENSE_SIZE);
struct hllhdr *hdr = (struct hllhdr*) bitcounters, *hdr2;
robj *o = NULL;
@@ -1431,7 +1431,7 @@ void pfselftestCommand(redisClient *c) {
if (j == 10) maxerr = 1;
if (abserr < 0) abserr = -abserr;
- if (abserr > maxerr) {
+ if (abserr > (int64_t)maxerr) {
addReplyErrorFormat(c,
"TESTFAILED Too big error. card:%llu abserr:%llu",
(unsigned long long) checkpoint,