From e21d1d38564dde337ab60636e28bfe8d5b6e67df Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 22 Jun 2018 09:57:55 +0200 Subject: QtCore/QtNetwork/QTestlib: Fix build with MinGW/g++ 8.1 x64 Fix warnings about invalid function type casts (return types conflicting with the FARPROC returned by GetProcAddress()) like: corelib\global\qoperatingsystemversion_win.cpp:100:48: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'RtlGetVersionFunction' {aka 'long int (*)(_OSVERSIONINFOW*)'} [-Werror=cast-function-type] io\qlockfile_win.cpp:158:85: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'GetModuleFileNameExFunc' {aka 'long unsigned int (*)(void*, HINSTANCE__*, wchar_t*, long unsigned int)'} [-Werror=cast-function-type] by introducing nested casts. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I3a5d2ea901bf5dc35963c589d61cf3dc7393377a Reviewed-by: Timur Pocheptsov --- src/network/kernel/qauthenticator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network') diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index a3ccf13e82..c995e3fef2 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -1454,8 +1454,8 @@ static bool q_NTLM_SSPI_library_load() securityDLLHandle = LoadLibrary(L"secur32.dll"); if (securityDLLHandle != NULL) { INIT_SECURITY_INTERFACE pInitSecurityInterface = - (INIT_SECURITY_INTERFACE)GetProcAddress(securityDLLHandle, - "InitSecurityInterfaceW"); + reinterpret_cast( + reinterpret_cast(GetProcAddress(securityDLLHandle, "InitSecurityInterfaceW"))); if (pInitSecurityInterface != NULL) pSecurityFunctionTable = pInitSecurityInterface(); } -- cgit v1.2.3