microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
10.37k stars 839 forks source link

2 Compiler warnings on Msys2, Mingw64, GCC #635

Open thehans opened 1 year ago

thehans commented 1 year ago

I'm trying to minimize warnings in our builds so just reporting 2 which are coming from mimalloc sources:

D:/a/openscad/openscad/submodules/mimalloc/src/os.c:376:5: warning: missing initializer for field 'AllocationProtect' of 'MEMORY_BASIC_INFORMATION' [-Wmissing-field-initializers]
  376 |     MEMORY_BASIC_INFORMATION info = { 0, 0 };
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from D:/a/_temp/msys64/mingw64/include/minwindef.h:163,
                 from D:/a/_temp/msys64/mingw64/include/windef.h:9,
                 from D:/a/_temp/msys64/mingw64/include/windows.h:69,
                 from D:/a/openscad/openscad/submodules/mimalloc/include/mimalloc-atomic.h:286,
                 from D:/a/openscad/openscad/submodules/mimalloc/include/mimalloc-types.h:13,
                 from D:/a/openscad/openscad/submodules/mimalloc/include/mimalloc-internal.h:11,
                 from D:/a/openscad/openscad/submodules/mimalloc/src/os.c:20:
D:/a/_temp/msys64/mingw64/include/winnt.h:5395:13: note: 'AllocationProtect' declared here
 5395 |       DWORD AllocationProtect;
      |             ^~~~~~~~~~~~~~~~~
D:/a/openscad/openscad/submodules/mimalloc/src/os.c:378:88: warning: comparison of integer expressions of different signedness: 'long long int' and 'long long unsigned int' [-Wsign-compare]
  378 |     if (info.AllocationBase < addr && ((uint8_t*)addr - (uint8_t*)info.AllocationBase) < MI_SEGMENT_SIZE) {
      |                                                                                        ^

mimalloc 1.7.6 Built on Windows using MSYS2 / mingw-w64 / gcc

daanx commented 1 year ago

This may be fixed now in the latest dev. Let me know