From ec5da59772646273dce00a2c56acab7929633902 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 May 2018 17:46:08 -0300 Subject: Disable the -Wmissing-field-initializers warning for Clang too qwldatadevicemanager.cpp:277:1: warning: missing field 'finish' initializer [-Wmissing-field-initializers] Change-Id: I052407b777ec43f78378fffd15311263e7498287 Reviewed-by: Johan Helsing --- src/compositor/wayland_wrapper/qwldatadevicemanager.cpp | 1 + src/qtwaylandscanner/qtwaylandscanner.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp index acca08e07..de62ffc3b 100644 --- a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp +++ b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp @@ -269,6 +269,7 @@ void DataDeviceManager::comp_destroy(wl_client *, wl_resource *) } QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers") +QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers") const struct wl_data_offer_interface DataDeviceManager::compositor_offer_interface = { DataDeviceManager::comp_accept, diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp index 057002c9d..1b884a424 100644 --- a/src/qtwaylandscanner/qtwaylandscanner.cpp +++ b/src/qtwaylandscanner/qtwaylandscanner.cpp @@ -394,6 +394,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr printf("QT_BEGIN_NAMESPACE\n"); printf("QT_WARNING_PUSH\n"); printf("QT_WARNING_DISABLE_GCC(\"-Wmissing-field-initializers\")\n"); + printf("QT_WARNING_DISABLE_CLANG(\"-Wmissing-field-initializers\")\n"); QByteArray serverExport; if (headerPath.size()) { serverExport = QByteArray("Q_WAYLAND_SERVER_") + preProcessorProtocolName + "_EXPORT"; -- cgit v1.2.3 From 40068e5bb5511f5ccbc28e1edd1ee26b91d0c1ec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 May 2018 17:43:54 -0300 Subject: Suppress warning about MFD_CLOEXEC being redefined glibc 2.27 #defined it as just "1U" instead of the kernel "0x0001U". Same value, but because the tokens are different, this triggers a warning. Change-Id: I052407b777ec43f78378fffd153112449de8cf4f Reviewed-by: Johan Helsing --- src/client/qwaylandshmbackingstore.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp index cbfdf5157..54b0b798c 100644 --- a/src/client/qwaylandshmbackingstore.cpp +++ b/src/client/qwaylandshmbackingstore.cpp @@ -59,7 +59,9 @@ #ifdef Q_OS_LINUX # include // from linux/memfd.h: -# define MFD_CLOEXEC 0x0001U +# ifndef MFD_CLOEXEC +# define MFD_CLOEXEC 0x0001U +# endif #endif QT_BEGIN_NAMESPACE -- cgit v1.2.3 From 1eba531d5b62bc171839d71e4a745ab9cdaaf907 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 2 May 2018 14:37:02 +0200 Subject: Client tests: Remove redundant cleanup testing We already have a QTRY_VERIFY(!compositor->surface()); in tst_WaylandClient::cleanup() which is already run after every test. The assertions from tests that are explicitly testing surface creation and destruction have not been removed. Change-Id: I21d574f5fe33d4e4c309dcfb2f50bde447238df2 Reviewed-by: Paul Olav Tvete --- tests/auto/client/client/tst_client.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index 05b8bac1a..978a9d5e6 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -263,9 +263,6 @@ void tst_WaylandClient::windowScreens() compositor->sendRemoveOutput(secondOutput); QTRY_COMPARE(QGuiApplication::screens().size(), 1); QCOMPARE(window.screen(), primaryScreen); - - window.destroy(); - QTRY_VERIFY(!compositor->surface()); } void tst_WaylandClient::removePrimaryScreen() @@ -297,9 +294,6 @@ void tst_WaylandClient::removePrimaryScreen() QTRY_COMPARE(window.mousePressEventCount, 1); compositor->sendMouseRelease(surface); QTRY_COMPARE(window.mouseReleaseEventCount, 1); - - window.destroy(); - QTRY_VERIFY(!compositor->surface()); } void tst_WaylandClient::createDestroyWindow() @@ -516,8 +510,6 @@ void tst_WaylandClient::dontCrashOnMultipleCommits() } delete window; - - QTRY_VERIFY(!compositor->surface()); } void tst_WaylandClient::hiddenTransientParent() -- cgit v1.2.3