astyle fix

This commit is contained in:
Reijo Tomperi 2010-04-05 20:57:54 +03:00
parent 218c18496d
commit 04b38e5428
3 changed files with 13 additions and 13 deletions

View File

@ -2568,13 +2568,13 @@ void CheckOther::checkMathFunctions()
MathLib::isNullValue(tok->tokAt(2)->str()) &&
MathLib::isNullValue(tok->tokAt(4)->str()))
{
mathfunctionCallError(tok,2);
mathfunctionCallError(tok, 2);
}
// fmod ( x , y) If y is zero, then either a range error will occur or the function will return zero (implementation-defined).
else if (Token::Match(tok, "fmod ( %num% , %num% )") &&
MathLib::isNullValue(tok->tokAt(4)->str()))
{
mathfunctionCallError(tok,2);
mathfunctionCallError(tok, 2);
}
}
@ -2728,7 +2728,7 @@ void CheckOther::mathfunctionCallError(const Token *tok, const unsigned int numP
{
if (tok)
{
if(numParam == 1)
if (numParam == 1)
reportError(tok, Severity::error, "wrongmathcall", "Passing value " + tok->tokAt(2)->str() + " to " + tok->str() + "() leads to undefined result");
else if (numParam == 2)
reportError(tok, Severity::error, "wrongmathcall", "Passing value " + tok->tokAt(2)->str() + " and " + tok->tokAt(4)->str() + " to " + tok->str() + "() leads to undefined result");

View File

@ -189,7 +189,7 @@ public:
void uninitdataError(const Token *tok, const std::string &varname);
void uninitvarError(const Token *tok, const std::string &varname);
void zerodivError(const Token *tok);
void mathfunctionCallError(const Token *tok, const unsigned int numParam=1);
void mathfunctionCallError(const Token *tok, const unsigned int numParam = 1);
void postIncrementError(const Token *tok, const std::string &var_name, const bool isIncrement);
void getErrorMessages()