diff options
author | João Valverde <j@v6e.pt> | 2023-01-14 03:49:49 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-01-14 14:52:53 +0000 |
commit | a23bab971ee05e5507822d51bcf2f448879d6a98 (patch) | |
tree | 003224f350e3bf170c26a4dc4635081fcd4e535e | |
parent | 6bfeecb562e96c28c7fe40ca371e0ab0be5ff72d (diff) |
MinGW: Disable -Wcast-function-type warnings
-rw-r--r-- | ui/win32/file_dlg_win32.cpp | 2 | ||||
-rw-r--r-- | wsutil/os_version_info.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ui/win32/file_dlg_win32.cpp b/ui/win32/file_dlg_win32.cpp index 53e6b92c4e..84f363a756 100644 --- a/ui/win32/file_dlg_win32.cpp +++ b/ui/win32/file_dlg_win32.cpp @@ -94,6 +94,7 @@ static GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContextP; static SetThreadDpiAwarenessContextProc SetThreadDpiAwarenessContextP; static gboolean got_proc_addresses = FALSE; +DIAG_OFF(cast-function-type) static gboolean get_proc_addresses(void) { if (got_proc_addresses) return TRUE; @@ -111,6 +112,7 @@ static gboolean get_proc_addresses(void) { got_proc_addresses = got_all; return got_all; } +DIAG_ON(cast-function-type) // Enabling DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 causes issues // when dragging our open file dialog between differently-DPIed diff --git a/wsutil/os_version_info.c b/wsutil/os_version_info.c index ea727be77a..96185d4602 100644 --- a/wsutil/os_version_info.c +++ b/wsutil/os_version_info.c @@ -208,7 +208,9 @@ get_os_version_info(GString *str) HMODULE ntdll_module = LoadLibrary(_T("ntdll.dll")); if (ntdll_module) { +DIAG_OFF(cast-function-type) RtlGetVersionP = (RtlGetVersionProc) GetProcAddress(ntdll_module, "RtlGetVersion"); +DIAG_ON(cast-function-type) } if (RtlGetVersionP) { |