Skip to content

Commit

Permalink
Fix warnings on Win64
Browse files Browse the repository at this point in the history
read.c:399:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  399 |                     obj = (void*)(long)cur->type;
      |                           ^
  • Loading branch information
orgads committed Apr 24, 2022
1 parent 47c3ece commit eedb37a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions read.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static int processLineItem(redisReader *r) {
if (r->fn && r->fn->createString)
obj = r->fn->createString(cur,p,len);
else
obj = (void*)(size_t)(cur->type);
obj = (void*)(uintptr_t)(cur->type);
}

if (obj == NULL) {
Expand Down Expand Up @@ -439,7 +439,7 @@ static int processBulkItem(redisReader *r) {
if (r->fn && r->fn->createString)
obj = r->fn->createString(cur,s+2,len);
else
obj = (void*)(long)cur->type;
obj = (void*)(uintptr_t)cur->type;
success = 1;
}
}
Expand Down Expand Up @@ -536,7 +536,7 @@ static int processAggregateItem(redisReader *r) {
if (r->fn && r->fn->createArray)
obj = r->fn->createArray(cur,elements);
else
obj = (void*)(long)cur->type;
obj = (void*)(uintptr_t)cur->type;

if (obj == NULL) {
__redisReaderSetErrorOOM(r);
Expand Down

0 comments on commit eedb37a

Please sign in to comment.