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>
This commit is contained in:
Thiago Macieira 2012-12-21 19:42:22 -08:00 committed by The Qt Project
parent 83188c6499
commit ddf8ebb014
2 changed files with 2 additions and 1 deletions

View File

@ -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());

View File

@ -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
}