Added workaround for the -Wsign-conversion warning that is triggered by CPU_ISSET(static_cast<int>(lp), &set) and CPU_SET(static_cast<int>(lp), &set) when topology.cc is compiled with GCC by suppressing the -Wsign-conversion warnings that GCC emits with CPU_ISSET(static_cast<int>(lp), &set) and CPU_SET(static_cast<int>(lp), &set) on Linux and FreeBSD.
The documentation of the CPU_ISSET and CPU_SET macros expect the first argument to CPU_ISSET and CPU_SET to be an int (according to https://www.gnu.org/software/libc/manual/html_node/CPU-Affinity.html), but casting lp to an int causes a -Wsign-conversion compiler warning when compiled with GCC.
Added workaround for the -Wsign-conversion warning that is triggered by
CPU_ISSET(static_cast<int>(lp), &set)
andCPU_SET(static_cast<int>(lp), &set)
when topology.cc is compiled with GCC by suppressing the -Wsign-conversion warnings that GCC emits withCPU_ISSET(static_cast<int>(lp), &set)
andCPU_SET(static_cast<int>(lp), &set)
on Linux and FreeBSD.The documentation of the CPU_ISSET and CPU_SET macros expect the first argument to CPU_ISSET and CPU_SET to be an int (according to https://www.gnu.org/software/libc/manual/html_node/CPU-Affinity.html), but casting
lp
to an int causes a -Wsign-conversion compiler warning when compiled with GCC.