summaryrefslogtreecommitdiff
path: root/src/ziplist.c
diff options
context:
space:
mode:
authorsundb <sundbcn@gmail.com>2021-01-10 01:52:42 +0800
committerGitHub <noreply@github.com>2021-01-09 19:52:42 +0200
commit36f1dea5e19982fac81d44de5bb0a4febe456b06 (patch)
tree52d7dbd912896da125d18fb7862d862a2104e8f2 /src/ziplist.c
parent8dd16caec833aebde3a12c7d7f9b6456554c8616 (diff)
downloadredis-36f1dea5e19982fac81d44de5bb0a4febe456b06.tar.gz
Fix compile warning when define REDIS_TEST (#8261)
Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'src/ziplist.c')
-rw-r--r--src/ziplist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ziplist.c b/src/ziplist.c
index 96ba47e13..a4f38c5e8 100644
--- a/src/ziplist.c
+++ b/src/ziplist.c
@@ -1713,7 +1713,7 @@ int ziplistTest(int argc, char **argv) {
if (p == NULL) {
printf("No entry\n");
} else {
- printf("ERROR: Out of range index should return NULL, returned offset: %ld\n", p-zl);
+ printf("ERROR: Out of range index should return NULL, returned offset: %ld\n", (long)(p-zl));
return 1;
}
printf("\n");
@@ -1763,7 +1763,7 @@ int ziplistTest(int argc, char **argv) {
if (p == NULL) {
printf("No entry\n");
} else {
- printf("ERROR: Out of range index should return NULL, returned offset: %ld\n", p-zl);
+ printf("ERROR: Out of range index should return NULL, returned offset: %ld\n", (long)(p-zl));
return 1;
}
printf("\n");