浏览代码

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

Caleb James DeLisle 3 年之前
父节点
当前提交
b9e41a2521
共有 1 个文件被更改,包括 3 次插入3 次删除
  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) {