From a33d9351a88da98e8ea0bf63b9b2c29ecc4a745d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 5 Sep 2013 22:23:42 -0700 Subject: [PATCH] Remove useless code setting but not using variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clang 3.3 found a variable assigned to itself, probably to cause GCC to shut up about a variable set-but-unused. So simply stop assigning the value at all to this variable. qxcbxsettings.cpp:155:16: error: explicitly assigning a variable of type 'uint' (aka 'unsigned int') to itself [-Werror,-Wself-assign] Change-Id: I74ae8f724e87c1b3f6b9d358e13d6a440ff4a3e1 Reviewed-by: Uli Schlachter Reviewed-by: Jan Arve Sæther --- src/plugins/platforms/xcb/qxcbxsettings.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp index 1423c6262d..8679d502d9 100644 --- a/src/plugins/platforms/xcb/qxcbxsettings.cpp +++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp @@ -151,8 +151,6 @@ public: // we ignore byteorder for now char byteOrder = xSettings.at(1); Q_UNUSED(byteOrder); - uint serial = *reinterpret_cast(xSettings.mid(4,4).constData()); - serial = serial; uint number_of_settings = *reinterpret_cast(xSettings.mid(8,4).constData()); const char *data = xSettings.constData() + 12; @@ -203,7 +201,6 @@ public: QXcbScreen *screen; xcb_window_t x_settings_window; - int serial; QMap settings; };