Fix Krazy code scanning tool warnings (QString, loops, spelling).

This commit is contained in:
Friedemann Kleint
2011-02-25 15:27:13 +01:00
parent 49311aa362
commit 88f333267f
56 changed files with 119 additions and 110 deletions

View File

@@ -280,7 +280,7 @@ void GdbEngine::updateSubItemClassic(const WatchData &data0)
if (debuggerCore()->boolSetting(AutoDerefPointers)) {
// Try automatic dereferentiation
data.exp = "(*(" + data.exp + "))";
data.type = data.type + "."; // FIXME: fragile HACK to avoid recursion
data.type = data.type + '.'; // FIXME: fragile HACK to avoid recursion
insertData(data);
} else {
data.setChildrenUnneeded();

View File

@@ -597,7 +597,7 @@ void CodaGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
sendGdbServerAck();
logMessage(_("Not implemented 'Continue with signal' %1: ").arg(signalNumber),
LogWarning);
sendGdbServerMessage("O" + QByteArray("Console output").toHex());
sendGdbServerMessage('O' + QByteArray("Console output").toHex());
sendGdbServerMessage("W81"); // "Process exited with result 1
sendTrkContinue();
}

View File

@@ -2782,7 +2782,7 @@ void GdbEngine::requestModuleSymbols(const QString &moduleName)
QString fileName = tf.fileName();
tf.close();
postCommand("maint print msymbols " + fileName.toLocal8Bit()
+ " " + moduleName.toLocal8Bit(),
+ ' ' + moduleName.toLocal8Bit(),
NeedsStop, CB(handleShowModuleSymbols),
QVariant(moduleName + QLatin1Char('@') + fileName));
}

View File

@@ -837,7 +837,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
}
} // qPart/qXfer
else if (cmd.startsWith("X")) {
else if (cmd.startsWith('X')) {
logMessage(msgGdbPacket(QLatin1String("Write memory")));
// X addr,length
sendGdbServerAck();