There were two problems:
1. VMW_BIT_MASK in x86cpuid.h generated an error when trying to
set all 32 bits. This was due to using 33 bits in an intermediate
calculation.
The fix is to keep the calculation within 32 bits.
2. static const VMCI_HANDLE was defined in vmci_defs.h, but not used
in one place that included the header.
The fix is to add -Wno-unused-const-variable to CFLAGS to disable
the new warning.
# Glib2 keep changing mutex APIs so we also need to disable 'deprecated'
# warnings for now (-Wno-deprecated-declarations).
for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \
- -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations; do
+ -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations \
+ -Wno-unused-const-variable; do
AC_MSG_CHECKING([for GCC flag $TEST_CFLAG])
ORIGINAL_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $TEST_CFLAG"
*
* e.g. - CPUID_VIRT_BITS_MASK = 0xff00
* - CPUID_VIRT_BITS_SHIFT = 8
- *
- * Note: The MASK definitions must use some gymnastics to get
- * around a warning when shifting left by 32.
*/
-#define VMW_BIT_MASK(shift) (((1 << (shift - 1)) << 1) - 1)
+#define VMW_BIT_MASK(shift) (0xffffffffu >> (32 - shift))
+
#define FIELD(lvl, ecxIn, reg, bitpos, size, name, s, c3) \
CPUID_##name##_SHIFT = bitpos, \