diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index ace283fc3b..0c8e734752 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -793,7 +793,7 @@ int main(int argc, char *argv[]) { WinShutdownMonitor::registerShutdownBlockReason( QObject::tr("%1 didn't yet exit safely...") .arg(QObject::tr(PACKAGE_NAME)), - static_cast(app.getMainWinId())); + (HWND)app.getMainWinId()); #endif app.exec(); app.requestShutdown(config); diff --git a/src/qt/winshutdownmonitor.cpp b/src/qt/winshutdownmonitor.cpp index 0c51cf9917..7962e63518 100644 --- a/src/qt/winshutdownmonitor.cpp +++ b/src/qt/winshutdownmonitor.cpp @@ -56,9 +56,8 @@ bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void WinShutdownMonitor::registerShutdownBlockReason(const QString &strReason, const HWND &mainWinId) { typedef BOOL(WINAPI * PSHUTDOWNBRCREATE)(HWND, LPCWSTR); - PSHUTDOWNBRCREATE shutdownBRCreate = - static_cast(GetProcAddress( - GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate")); + PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress( + GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate"); if (shutdownBRCreate == nullptr) { qWarning() << "registerShutdownBlockReason: GetProcAddress for " "ShutdownBlockReasonCreate failed";