From bd60c11bd8ca652f6cb6ecc57d0d10bc8aaa3481 Mon Sep 17 00:00:00 2001 From: qetu3790 Date: Thu, 23 Jan 2020 17:18:07 +0800 Subject: [PATCH 1/3] Fix not used constant in lru_test_mode. LRU_CYCLE_PERIOD is defined,but not used. --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 065c389c6..36ceb16e8 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -7735,7 +7735,7 @@ static void LRUTestMode(void) { * to fill the target instance easily. */ start_cycle = mstime(); long long hits = 0, misses = 0; - while(mstime() - start_cycle < 1000) { + while(mstime() - start_cycle < LRU_CYCLE_PERIOD) { /* Write cycle. */ for (j = 0; j < LRU_CYCLE_PIPELINE_SIZE; j++) { char val[6]; From 743cfc0ad604c48bfa8c408ca36c6a5b90996aad Mon Sep 17 00:00:00 2001 From: hwware Date: Sat, 22 Feb 2020 11:38:51 -0500 Subject: [PATCH 2/3] add missing file marco --- src/sdsalloc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sdsalloc.h b/src/sdsalloc.h index 531d41929..c04ff2a0a 100644 --- a/src/sdsalloc.h +++ b/src/sdsalloc.h @@ -36,7 +36,12 @@ * the include of your alternate allocator if needed (not needed in order * to use the default libc allocator). */ +#ifndef __SDS_ALLOC_H__ +#define __SDS_ALLOC_H__ + #include "zmalloc.h" #define s_malloc zmalloc #define s_realloc zrealloc #define s_free zfree + +#endif From 98b23cce295d1ed584de00395695a012ef2dd2ab Mon Sep 17 00:00:00 2001 From: ShooterIT Date: Sat, 29 Feb 2020 18:28:41 +0800 Subject: [PATCH 3/3] Avoid compiler warnings --- src/acl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/acl.c b/src/acl.c index b046785ff..efe6b96ad 100644 --- a/src/acl.c +++ b/src/acl.c @@ -1830,6 +1830,7 @@ void aclCommand(client *c) { case ACL_DENIED_CMD: reasonstr="command"; break; case ACL_DENIED_KEY: reasonstr="key"; break; case ACL_DENIED_AUTH: reasonstr="auth"; break; + default: reasonstr="unknown"; } addReplyBulkCString(c,reasonstr);