From ddf8ebb0145f81d0deb0aabf7b774c42e4be4c2b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Dec 2012 19:42:22 -0800 Subject: Fix warnings found by GCC 4.7 in the XCB platform plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qxcbnativeinterface.cpp:246:8: error: unused parameter 'context' [-Werror=unused-parameter] qxcbcursor.cpp:550:85: error: 'root' may be used uninitialized in this function [-Werror=maybe-uninitialized] Change-Id: I5fa4e717c86d0e8198e501e6c799e0ceb9264708 Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbcursor.cpp | 2 +- src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index e1dfe3d6c0..e2843d04dc 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -545,7 +545,7 @@ QPoint QXcbCursor::pos() const void QXcbCursor::setPos(const QPoint &pos) { - xcb_window_t root; + xcb_window_t root = 0; queryPointer(connection(), &root, 0); xcb_warp_pointer(xcb_connection(), XCB_NONE, root, 0, 0, 0, 0, pos.x(), pos.y()); xcb_flush(xcb_connection()); diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 9c360df900..9a24390bac 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -250,6 +250,7 @@ void * QXcbNativeInterface::eglContextForContext(QOpenGLContext *context) QEGLPlatformContext *eglPlatformContext = static_cast(context->handle()); return eglPlatformContext->eglContext(); #else + Q_UNUSED(context); return 0; #endif } -- cgit v1.2.3