在 2024-09-18 20:36, Jacek Caban 写道:
That warning seems very impractical in code dealing with GetProcAddress. In Wine, we usually just cast it to (void *), but I recall that it was problematic for mingw-w64-crt for some reason too. Maybe we could just disable that warning in the configure script?

It's required by POSIX, but casting between a function pointer and an object pointer can produce a warning with `-pedantic`.

It looks like GCC warns in C and Clang warns in C++. /facepalm

My previous suggestion is to cast through `intptr_t` or `INT_PTR`. If we really need to cast via a function pointer, I'd prefer we have `typedef void (__cdecl *_PVFV)(void);` in a header and reuse that alias.


--
Best regards,
LIU Hao

Attachment: 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

Reply via email to