mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
fix: avoid warning
warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
This commit is contained in:
parent
a09a64e29b
commit
d5475a58a1
1 changed files with 1 additions and 1 deletions
2
src/os.c
2
src/os.c
|
@ -1036,7 +1036,7 @@ static size_t mi_os_numa_nodex() {
|
|||
static size_t mi_os_numa_node_countx(void) {
|
||||
ULONG numa_max = 0;
|
||||
GetNumaHighestNodeNumber(&numa_max);
|
||||
return (numa_max + 1);
|
||||
return ((size_t)numa_max + 1);
|
||||
}
|
||||
#elif defined(__linux__)
|
||||
#include <sys/syscall.h> // getcpu
|
||||
|
|
Loading…
Add table
Reference in a new issue