From 84dd746a2ab331a483a4803a9155b2db4b1cec84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Wed, 1 Sep 2021 19:26:46 +0200 Subject: [PATCH] Fix some warnings --- src/wayland/autotests/client/test_datadevice.cpp | 4 ++-- src/wayland/inputmethod_v1_interface.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wayland/autotests/client/test_datadevice.cpp b/src/wayland/autotests/client/test_datadevice.cpp index ca7730ede3..9d7ee9e2fa 100644 --- a/src/wayland/autotests/client/test_datadevice.cpp +++ b/src/wayland/autotests/client/test_datadevice.cpp @@ -581,8 +581,8 @@ void TestDataDevice::testReplaceSource() // try to crash by destroying the data source, then requesting data dataSource4.reset(); - int pipeFds[2]; - Q_ASSERT(pipe(pipeFds) == 0); + int pipeFds[2] = {0, 0}; + QVERIFY(pipe(pipeFds) == 0); dataOffer->receive(QStringLiteral("text/plain"), pipeFds[1]); close(pipeFds[1]); diff --git a/src/wayland/inputmethod_v1_interface.cpp b/src/wayland/inputmethod_v1_interface.cpp index 28bf6c6e80..de65d2bd4f 100644 --- a/src/wayland/inputmethod_v1_interface.cpp +++ b/src/wayland/inputmethod_v1_interface.cpp @@ -189,6 +189,9 @@ public: case ZWP_TEXT_INPUT_V1_TEXT_DIRECTION_AUTO: qtDirection = Qt::LayoutDirectionAuto; break; + default: + Q_UNREACHABLE(); + break; } Q_EMIT q->textDirection(serial, qtDirection); }