diff options
author | Matt Stancliff <matt@genges.com> | 2014-11-08 10:16:54 -0500 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2014-12-23 09:31:03 -0500 |
commit | 8380655e85f0afd1f0afc99b464717cb97002b7a (patch) | |
tree | 504f4e3a8b6fccda19ae50ddb9f5457a05e56f6f | |
parent | 27937c2821a85efd4245fcbac3ebed782129f5d7 (diff) | |
download | redis-8380655e85f0afd1f0afc99b464717cb97002b7a.tar.gz |
Remove ziplist compiler warnings
Only happen when compiled with the test define.
-rw-r--r-- | src/ziplist.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ziplist.c b/src/ziplist.c index 64a22adfc..41d9cb20c 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -1028,10 +1028,12 @@ void pop(unsigned char *zl, int where) { else printf("Pop tail: "); - if (vstr) + if (vstr) { if (vlen && fwrite(vstr,vlen,1,stdout) == 0) perror("fwrite"); - else + } + else { printf("%lld", vlong); + } printf("\n"); ziplistDeleteRange(zl,-1,1); @@ -1368,7 +1370,7 @@ int main(int argc, char **argv) { { char v[3][257]; zlentry e[3]; - int i; + size_t i; for (i = 0; i < (sizeof(v)/sizeof(v[0])); i++) { memset(v[i], 'a' + i, sizeof(v[0])); @@ -1464,7 +1466,7 @@ int main(int argc, char **argv) { for (i = 0; i < 20000; i++) { zl = ziplistNew(); ref = listCreate(); - listSetFreeMethod(ref,sdsfree); + listSetFreeMethod(ref,(void (*)(void*))sdsfree); len = rand() % 256; /* Create lists */ |