Pedantic compiler warning on an integral type mismatch in zone_batch_malloc() in the OSX primitive:
|
static unsigned zone_batch_malloc(malloc_zone_t* zone, size_t size, void** ps, unsigned count) { |
static unsigned zone_batch_malloc(malloc_zone_t* zone, size_t size, void** ps, unsigned count) {
size_t i;
for (i = 0; i < count; i++) {
ps[i] = zone_malloc(zone, size);
if (ps[i] == NULL) break;
}
return i;
}
count is an unsigned, while i is a size_t. Since this is part of Apple's malloc zone hooks, we're stuck with the interface declaration, so making i an unsigned silences the warning.
Pedantic compiler warning on an integral type mismatch in zone_batch_malloc() in the OSX primitive:
mimalloc/src/prim/osx/alloc-override-zone.c
Line 85 in 09a2709
countis anunsigned, whileiis asize_t. Since this is part of Apple's malloc zone hooks, we're stuck with the interface declaration, so makingian unsigned silences the warning.