在 2024-08-05 01:40, Pali Rohár 写道:
It looks like that casting whole function pointer to LPVOID type prior casting to FARPROC mutes this warning.Now I remember that in past I have already used casting return value from GetProcAddress() to LPVOID and after that to the correct function pointer type which muted gcc warnings.
No, cast to `INT_PTR` instead. Casting between function pointers and object pointers is undefined behavior in C; but it's required by POSIX, and is conditionally supported in C++.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public