diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-06-22 09:57:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-06-25 14:56:19 +0000 |
commit | e21d1d38564dde337ab60636e28bfe8d5b6e67df (patch) | |
tree | ef0ea0f4c87d4a34cc242cb26335bac237d7a69b /src/network/kernel/qauthenticator.cpp | |
parent | 7c34e0a7b48572be1f9e3fb45911a13b01798e37 (diff) |
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 <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/kernel/qauthenticator.cpp')
-rw-r--r-- | src/network/kernel/qauthenticator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<INIT_SECURITY_INTERFACE>( + reinterpret_cast<QFunctionPointer>(GetProcAddress(securityDLLHandle, "InitSecurityInterfaceW"))); if (pInitSecurityInterface != NULL) pSecurityFunctionTable = pInitSecurityInterface(); } |