diff --git a/src/checkother.cpp b/src/checkother.cpp index a3643ac05..11000a692 100644 --- a/src/checkother.cpp +++ b/src/checkother.cpp @@ -967,7 +967,7 @@ void CheckOther::CheckZeroDivision() for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { if (Token::simpleMatch(tok, "/ 0")) - zerodivWarning(tok); + zerodivError(tok); } } @@ -1064,7 +1064,7 @@ void CheckOther::nullPointerError(const Token *tok) reportError(tok, "error", "nullPointer", "Possible null pointer dereference"); } -void CheckOther::zerodivWarning(const Token *tok) +void CheckOther::zerodivError(const Token *tok) { - reportError(tok, "style", "zerodivWarning", "Warning: Division with zero"); + reportError(tok, "error", "zerodiv", "Division with zero"); } diff --git a/src/checkother.h b/src/checkother.h index b7313d4ac..1c8863674 100644 --- a/src/checkother.h +++ b/src/checkother.h @@ -144,7 +144,7 @@ private: void strPlusChar(const Token *tok); void returnLocalVariable(const Token *tok); void nullPointerError(const Token *tok); - void zerodivWarning(const Token *tok); + void zerodivError(const Token *tok); void getErrorMessages() { @@ -166,7 +166,7 @@ private: strPlusChar(0); returnLocalVariable(0); nullPointerError(0); - zerodivWarning(0); + zerodivError(0); } }; diff --git a/test/testother.cpp b/test/testother.cpp index 33b8d6e2e..bf1454eff 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -93,7 +93,7 @@ private: "}"); - ASSERT_EQUALS(std::string("[test.cpp:5]: (style) Warning: Division with zero\n"), errout.str()); + ASSERT_EQUALS(std::string("[test.cpp:5]: (error) Division with zero\n"), errout.str()); } void zeroDiv2()