Browse Source

Make sure to cast uintptr to long before passing it to a printf

Caleb James DeLisle 3 years ago
parent
commit
b9e41a2521
1 changed files with 3 additions and 3 deletions
  1. 3 3
      memory/Allocator.c

+ 3 - 3
memory/Allocator.c

@@ -59,9 +59,9 @@ static void unroll(struct Allocator_pvt* context,
         writeUnroller(&childUnroller);
         fprintf(stderr, "%s:%ld [%lu] bytes at [0x%lx]\n",
                 allocation->fileName,
-                allocation->lineNum,
-                allocation->pub.size,
-                (long)(uintptr_t)allocation);
+                (unsigned long)allocation->lineNum,
+                (unsigned long)allocation->pub.size,
+                (unsigned long)(uintptr_t)allocation);
         allocation = allocation->next;
     }
     if (context->nextSibling) {