errmsg: Made the 'unsigned division' a style error

This commit is contained in:
Daniel Marjamäki 2009-01-12 17:14:03 +00:00
parent 980b10bfc9
commit 03888046d8
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ public:
}
static bool udivWarning(const Settings &s)
{
return s._showAll;
return s._showAll & s._checkCodingStyle;
}
};

View File

@ -82,7 +82,7 @@ int main()
err.push_back(Message("ifNoAction", Message::STYLE, "Found redundant if condition - 'if (condition);'"));
err.push_back(Message("sprintfOverlappingData", 0, "Overlapping data buffer %1", "varname"));
err.push_back(Message("udivError", 0, "Unsigned division. The result will be wrong."));
err.push_back(Message("udivWarning", Message::ALL, "Warning: Division with signed and unsigned operators"));
err.push_back(Message("udivWarning", Message::STYLE | Message::ALL, "Warning: Division with signed and unsigned operators"));
// Generate code..
std::cout << "Generate code.." << std::endl;