From 62b155bedf50bbe04ec9c4b645ac0c64bb51e6c6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 7 Mar 2015 17:59:48 -0800 Subject: [PATCH] Disable -Wcast-qual in qtwayland We have a lot of generated C source code that needs to do casting and C doesn't have const_cast, so the -Wcast-qual option produces a lot of noise. Let's make sure it isn't enabled in qmake.conf or qt_common.prf. Change-Id: Iee8cbc07c4434ce9b560ffff13c9635861a8eca9 Reviewed-by: Giulio Camuffo --- src/plugins/platforms/wayland/client.pro | 3 +++ .../hardwareintegration/drm-egl-server/drm-egl-server.pro | 3 +++ .../hardwareintegration/xcomposite-egl/xcomposite-egl.pro | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/plugins/platforms/wayland/client.pro b/src/plugins/platforms/wayland/client.pro index ef3cff054fc..00e9cd04a97 100644 --- a/src/plugins/platforms/wayland/client.pro +++ b/src/plugins/platforms/wayland/client.pro @@ -10,6 +10,9 @@ MODULE_PLUGIN_TYPES = \ load(qt_module) +# We have a bunch of C code with casts, so we can't have this option +QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual + CONFIG -= precompile_header CONFIG -= create_cmake CONFIG += link_pkgconfig qpa/genericunixfontdatabase wayland-scanner diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro index 3a57958683d..3c069b7dd94 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/drm-egl-server.pro @@ -1,6 +1,9 @@ PLUGIN_TYPE = wayland-graphics-integration-client load(qt_plugin) +# We have a bunch of C code with casts, so we can't have this option +QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual + QT += waylandclient-private include(../../../../hardwareintegration/client/drm-egl-server/drm-egl-server.pri) diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro index 97e642fbb66..1af1786695f 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/xcomposite-egl.pro @@ -1,6 +1,9 @@ PLUGIN_TYPE = wayland-graphics-integration-client load(qt_plugin) +# We have a bunch of C code with casts, so we can't have this option +QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual + QT += waylandclient-private include(../../../../hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri)