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) {