Procházet zdrojové kódy

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

Caleb James DeLisle před 3 roky
rodič
revize
b9e41a2521
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  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) {