MinGW: Avoid GCC -Wcast-function-type warnings on GetProcAddress
Using the same method as GNUlib and various other projects. https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00109.html The warning is valid, but there's no way around it since the issue comes from the Windows SDK. It's also harmless in this case. Part of #29801.
This commit is contained in:
@ -74,6 +74,11 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
#define WM_POINTERUPDATE 0x0245
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// Workaround GCC warning from -Wcast-function-type.
|
||||
#define GetProcAddress (void *)GetProcAddress
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int count;
|
||||
int screen;
|
||||
|
||||
Reference in New Issue
Block a user