Core/Misc: Fix static analysis issues

This commit is contained in:
jackpoz authored and Aokromes committed 2017-11-12 13:24:42 +01:00
1 parent be9a73c0ad
commit 67dc6a7576
7 files changed
+20 -20

No files matched your search

+4 -4
View File
@@ -1977,15 +1977,15 @@ public:
stmt->setInt64(0, muteTime);
}
stmt->setString(1, muteReasonStr.c_str());
stmt->setString(2, muteBy.c_str());
stmt->setString(1, muteReasonStr);
stmt->setString(2, muteBy);
stmt->setUInt32(3, accountId);
LoginDatabase.Execute(stmt);
stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_MUTE);
stmt->setUInt32(0, accountId);
stmt->setUInt32(1, notSpeakTime);
stmt->setString(2, muteBy.c_str());
stmt->setString(3, muteReasonStr.c_str());
stmt->setString(2, muteBy);
stmt->setString(3, muteReasonStr);
LoginDatabase.Execute(stmt);
std::string nameLink = handler->playerLink(targetName);
@@ -144,7 +144,7 @@ class AccountActionIpLogger : public AccountScript
stmt->setUInt32(1, characterGuid);
stmt->setUInt8(2, aType);
stmt->setUInt32(3, playerGuid);
stmt->setString(4, systemNote.c_str());
stmt->setString(4, systemNote);
LoginDatabase.Execute(stmt);
}
else // ... but for failed login, we query last_attempt_ip from account table. Which we do with an unique query
@@ -155,7 +155,7 @@ class AccountActionIpLogger : public AccountScript
stmt->setUInt32(1, characterGuid);
stmt->setUInt8(2, aType);
stmt->setUInt32(3, playerGuid);
stmt->setString(4, systemNote.c_str());
stmt->setString(4, systemNote);
LoginDatabase.Execute(stmt);
}
return;
@@ -236,8 +236,8 @@ class CharacterActionIpLogger : public PlayerScript
stmt->setUInt32(0, playerGuid);
stmt->setUInt32(1, characterGuid);
stmt->setUInt8(2, aType);
stmt->setString(3, currentIp.c_str()); // We query the ip here.
stmt->setString(4, systemNote.c_str());
stmt->setString(3, currentIp); // We query the ip here.
stmt->setString(4, systemNote);
// Seeing as the time differences should be minimal, we do not get unixtime and the timestamp right now;
// Rather, we let it be added with the SQL query.
@@ -297,7 +297,7 @@ public:
stmt2->setUInt32(1, characterGuid);
stmt2->setUInt8(2, aType);
stmt2->setUInt32(3, playerGuid);
stmt2->setString(4, systemNote.c_str());
stmt2->setString(4, systemNote);
// Seeing as the time differences should be minimal, we do not get unixtime and the timestamp right now;
// Rather, we let it be added with the SQL query.