Fix some of the issues from #478 (Warnings in Visual Studio build with -W4)
http://sourceforge.net/apps/trac/cppcheck/ticket/478
This commit is contained in:
parent
973bb164ea
commit
d2278b5ce0
|
@ -945,9 +945,8 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list<const Toke
|
|||
}
|
||||
|
||||
// Callback..
|
||||
bool matchFirst;
|
||||
if ((matchFirst = Token::Match(tok, "( %var%")) ||
|
||||
Token::Match(tok, "( * %var%"))
|
||||
bool matchFirst = Token::Match(tok, "( %var%");
|
||||
if (matchFirst || Token::Match(tok, "( * %var%"))
|
||||
{
|
||||
int tokIdx = matchFirst ? 2 : 3;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
|
|||
std::string temp;
|
||||
for (unsigned int i = 0; i < len && iss.good(); ++i)
|
||||
{
|
||||
char c = iss.get();
|
||||
char c = static_cast<char>(iss.get());
|
||||
temp.append(1, c);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
|
|||
std::string temp;
|
||||
for (unsigned int i = 0; i < len && iss.good(); ++i)
|
||||
{
|
||||
char c = iss.get();
|
||||
char c = static_cast<char>(iss.get());
|
||||
temp.append(1, c);
|
||||
}
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ std::string Preprocessor::read(std::istream &istr)
|
|||
if (ch == '\\')
|
||||
{
|
||||
char chNext = 0;
|
||||
while (true)
|
||||
for (;;)
|
||||
{
|
||||
chNext = (char)istr.peek();
|
||||
if (chNext != '\n' && chNext != '\r' && (chNext > 0) &&
|
||||
|
|
Loading…
Reference in New Issue