1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Windows: Fix compilation warnings with GCC 11.2.1

This commit is contained in:
Rémi Verschelde
2021-11-10 15:09:56 +01:00
parent e317e34c15
commit b727061ce0
3 changed files with 17 additions and 5 deletions

View File

@@ -42,6 +42,11 @@
#include "drivers/gles3/rasterizer_gles3.h"
#endif
#if defined(__GNUC__)
// Workaround GCC warning from -Wcast-function-type.
#define GetProcAddress (void *)GetProcAddress
#endif
static String format_error_message(DWORD id) {
LPWSTR messageBuffer = nullptr;
size_t size = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,