Remove useless code setting but not using variables

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 <psychon@znc.in>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Thiago Macieira 2013-09-05 22:23:42 -07:00 committed by The Qt Project
parent 90005fae17
commit a33d9351a8

View File

@ -151,8 +151,6 @@ public:
// we ignore byteorder for now
char byteOrder = xSettings.at(1);
Q_UNUSED(byteOrder);
uint serial = *reinterpret_cast<const uint *>(xSettings.mid(4,4).constData());
serial = serial;
uint number_of_settings = *reinterpret_cast<const uint *>(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<QByteArray, QXcbXSettingsPropertyValue> settings;
};