From 1b72d3e645a41c7b7f7731cecbd7119b8e7f7f28 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Tue, 27 Feb 2018 15:28:18 +0200 Subject: Silence a GCC 8 warning in qxcbnativeinterface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtbase/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:309:65: error: cast between incompatible function types from ‘void (*)(const char*)’ to ‘QPlatformNativeInterface::NativeResourceForIntegrationFunction’ {aka ‘void* (*)()’} [-Werror=cast-function-type] return NativeResourceForIntegrationFunction(setStartupId); Change-Id: I83409b3a6cc67ccb4c9e91e592e6a01bb6ce45ea Reviewed-by: Friedemann Kleint --- src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp') diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 22d90d6ac2..db44e58cbb 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -306,13 +306,13 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QXcbNativeInterfa return func; if (lowerCaseResource == "setstartupid") - return NativeResourceForIntegrationFunction(setStartupId); + return NativeResourceForIntegrationFunction(reinterpret_cast(setStartupId)); if (lowerCaseResource == "generatepeekerid") - return NativeResourceForIntegrationFunction(generatePeekerId); + return NativeResourceForIntegrationFunction(reinterpret_cast(generatePeekerId)); if (lowerCaseResource == "removepeekerid") - return NativeResourceForIntegrationFunction(removePeekerId); + return NativeResourceForIntegrationFunction(reinterpret_cast(removePeekerId)); if (lowerCaseResource == "peekeventqueue") - return NativeResourceForIntegrationFunction(peekEventQueue); + return NativeResourceForIntegrationFunction(reinterpret_cast(peekEventQueue)); return 0; } @@ -334,9 +334,9 @@ QPlatformNativeInterface::NativeResourceForScreenFunction QXcbNativeInterface::n return func; if (lowerCaseResource == "setapptime") - return NativeResourceForScreenFunction(setAppTime); + return NativeResourceForScreenFunction(reinterpret_cast(setAppTime)); else if (lowerCaseResource == "setappusertime") - return NativeResourceForScreenFunction(setAppUserTime); + return NativeResourceForScreenFunction(reinterpret_cast(setAppUserTime)); return 0; } @@ -388,7 +388,7 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio } if (function == QXcbScreenFunctions::virtualDesktopNumberIdentifier()) - return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(QXcbScreen::virtualDesktopNumberStatic)); + return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(reinterpret_cast(QXcbScreen::virtualDesktopNumberStatic))); return nullptr; } -- cgit v1.2.3