在 2022-03-12 21:11, Pali Rohár 写道:
x86_64-w64-mingw32-gcc throws following -Wsign-compare warning when compiling 64-bit NT kernel drivers which include ddk/ntddk.h file:ddk/wdm.h: In function ‘RtlExtendedMagicDivide’: ddk/wdm.h:9531:32: warning: operand of ?: changes signedness from ‘long long int’ to ‘ULONG64’ {aka ‘long long unsigned int’} due to unsignedness of other operand [-Wsign-compare] ret.QuadPart = Pos ? ret64 : -(LONG64)ret64; ^~~~~~~~~~~~~~ Member ret.QuadPart is of type LONGLONG, so explicitly cast both parts of ret64 ternary operator to LONG64. --- mingw-w64-headers/ddk/include/ddk/wdm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks. Looks good to me. Pushed. -- Best regards, LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public