summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-21 19:42:22 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-03 14:18:03 +0100
commitddf8ebb0145f81d0deb0aabf7b774c42e4be4c2b (patch)
tree3b7aa0362712166d9ce2e2819086e3924850e927 /src
parent83188c6499ccdc87c0a2c468bb497e287f5db369 (diff)
Fix warnings found by GCC 4.7 in the XCB platform plugin
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 <samuel.rodal@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp1
2 files changed, 2 insertions, 1 deletions
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<QEGLPlatformContext *>(context->handle());
return eglPlatformContext->eglContext();
#else
+ Q_UNUSED(context);
return 0;
#endif
}