Remove some useless casts, probably added to avoid false positives.
This commit is contained in:
parent
b8e77c8005
commit
f3b4c1d0db
|
@ -159,7 +159,7 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
|
|||
|
||||
_id = results[0];
|
||||
_severity = Severity::fromString(results[1]);
|
||||
_cwe = (unsigned)MathLib::toULongNumber(results[2]);
|
||||
_cwe = MathLib::toULongNumber(results[2]);
|
||||
_shortMessage = results[3];
|
||||
_verboseMessage = results[4];
|
||||
|
||||
|
@ -235,7 +235,7 @@ std::string ErrorLogger::ErrorMessage::fixInvalidChars(const std::string& raw)
|
|||
} else {
|
||||
std::ostringstream es;
|
||||
// straight cast to (unsigned) doesn't work out.
|
||||
const unsigned uFrom = (unsigned)(unsigned char)*from;
|
||||
const unsigned uFrom = (unsigned char)*from;
|
||||
#if 0
|
||||
if (uFrom<0x20)
|
||||
es << "\\XXX";
|
||||
|
|
|
@ -1525,9 +1525,9 @@ static void execute(const Token *expr,
|
|||
const std::string strValue = val.tokvalue->strValue();
|
||||
MathLib::bigint index = 0;
|
||||
execute(expr->astOperand2(), programMemory, &index, error);
|
||||
if (index >= 0 && index < (int)strValue.size())
|
||||
if (index >= 0 && index < strValue.size())
|
||||
*result = strValue[index];
|
||||
else if (index == (int)strValue.size())
|
||||
else if (index == strValue.size())
|
||||
*result = 0;
|
||||
else
|
||||
*error = true;
|
||||
|
|
Loading…
Reference in New Issue