Skip to content

Commit eb29d6b

Browse files
committed
fix warning on windows
1 parent 864e4be commit eb29d6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/os.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ static bool mi_os_mem_free(void* addr, size_t size, bool was_committed, mi_stats
375375
// the start of the region.
376376
MEMORY_BASIC_INFORMATION info = { 0, 0 };
377377
VirtualQuery(addr, &info, sizeof(info));
378-
if (info.AllocationBase < addr && ((uint8_t*)addr - (uint8_t*)info.AllocationBase) < MI_SEGMENT_SIZE) {
378+
if (info.AllocationBase < addr && ((uint8_t*)addr - (uint8_t*)info.AllocationBase) < (ptrdiff_t)MI_SEGMENT_SIZE) {
379379
errcode = 0;
380380
err = (VirtualFree(info.AllocationBase, 0, MEM_RELEASE) == 0);
381381
if (err) { errcode = GetLastError(); }

0 commit comments

Comments
 (0)