From c6a864f03ea12f83574d7e5867880b6123d56401 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Tue, 12 Jun 2018 21:56:21 +0300 Subject: [PATCH] Fix 'unused parameter' warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: The warnings: ``` /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void KWayland::Server::XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client*, wl_resource*)’: /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:95:95: warning: unused parameter ‘resource’ [-Wunused-parameter] void XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) ~~~~~~~~~~~~~^~~~~~~~ /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void KWayland::Server::XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client*, wl_resource*)’: /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:237:95: warning: unused parameter ‘resource’ [-Wunused-parameter] void XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) ~~~~~~~~~~~~~^~~~~~~~ /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void KWayland::Server::XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client*, wl_resource*, wl_resource*)’: /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:439:78: warning: unused parameter ‘client’ [-Wunused-parameter] void XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client *client, wl_resource *resource, wl_resource * surface) ~~~~~~~~~~~^~~~~~ /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgoutput_interface.cpp: In constructor ‘KWayland::Server::XdgOutputManagerInterface::XdgOutputManagerInterface(KWayland::Server::Display*, QObject*)’: /home/vlad/KDE/src/frameworks/kwayland/src/server/xdgoutput_interface.cpp:88:81: warning: unused parameter ‘parent’ [-Wunused-parameter] XdgOutputManagerInterface::XdgOutputManagerInterface(Display *display, QObject *parent) ~~~~~~~~~^~~~~~ ``` Test Plan: No more 'unused parameter' warnings. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D13501 --- src/wayland/server/xdgoutput_interface.cpp | 2 +- src/wayland/xdgforeign_v2_interface.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wayland/server/xdgoutput_interface.cpp b/src/wayland/server/xdgoutput_interface.cpp index 82c9dfdeb5..7794021272 100644 --- a/src/wayland/server/xdgoutput_interface.cpp +++ b/src/wayland/server/xdgoutput_interface.cpp @@ -86,7 +86,7 @@ public: XdgOutputManagerInterface::XdgOutputManagerInterface(Display *display, QObject *parent) - : Global(new XdgOutputManagerInterface::Private(this, display)) + : Global(new XdgOutputManagerInterface::Private(this, display), parent) { } diff --git a/src/wayland/xdgforeign_v2_interface.cpp b/src/wayland/xdgforeign_v2_interface.cpp index 645ebb7cf5..4f296abe24 100644 --- a/src/wayland/xdgforeign_v2_interface.cpp +++ b/src/wayland/xdgforeign_v2_interface.cpp @@ -95,6 +95,7 @@ XdgExportedUnstableV2Interface *XdgExporterUnstableV2Interface::exportedSurface( void XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) { Q_UNUSED(client) + Q_UNUSED(resource) } void XdgExporterUnstableV2Interface::Private::exportCallback(wl_client *client, wl_resource *resource, uint32_t id, wl_resource * surface) @@ -237,6 +238,7 @@ XdgImporterUnstableV2Interface::Private *XdgImporterUnstableV2Interface::d_func( void XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) { Q_UNUSED(client) + Q_UNUSED(resource) } void XdgImporterUnstableV2Interface::Private::importCallback(wl_client *client, wl_resource *resource, uint32_t id, const char *h) @@ -438,6 +440,8 @@ SurfaceInterface *XdgImportedUnstableV2Interface::child() const void XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client *client, wl_resource *resource, wl_resource * surface) { + Q_UNUSED(client) + auto s = cast(resource); SurfaceInterface *surf = SurfaceInterface::get(surface);