MinGW: Disable -Wcast-function-type warnings

This commit is contained in:
João Valverde 2023-01-14 03:49:49 +00:00
parent 6bfeecb562
commit a23bab971e
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

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