doc: refactoring of the docs for CheckOther

This commit is contained in:
Daniel Marjamäki 2009-10-04 13:46:37 +02:00
parent 7f6fcc6556
commit 6aea2faacd
1 changed files with 21 additions and 8 deletions

View File

@ -147,12 +147,17 @@ public:
void getErrorMessages()
{
// error
sprintfOverlappingDataError(0, "varname");
udivError(0);
nullPointerError(0, "pointer");
zerodivError(0);
// style
cstyleCastError(0);
redundantIfDelete0Error(0);
redundantIfRemoveError(0);
dangerousUsageStrtolError(0);
sprintfOverlappingDataError(0, "varname");
udivError(0);
udivWarning(0);
unusedStructMemberError(0, "structname", "variable");
passedByValueError(0, "parametername");
@ -162,8 +167,8 @@ public:
variableScopeError(0, "varname");
conditionAlwaysTrueFalse(0, "true/false");
strPlusChar(0);
nullPointerError(0, "pointer");
zerodivError(0);
// optimisations
postIncrementError(0, "varname", true);
}
@ -175,19 +180,27 @@ public:
std::string classInfo() const
{
return "Other checks\n"
// error
" * [[OverlappingData|bad usage of the function 'sprintf' (overlapping data)]]\n"
" * division with zero\n"
" * null pointer dereferencing\n"
// warning
" * C-style pointer cast in cpp file\n"
" * redundant if\n"
" * bad usage of the function 'strtol'\n"
" * [[OverlappingData|bad usage of the function 'sprintf' (overlapping data)]]\n"
" * division with zero\n"
" * [[CheckUnsignedDivision|unsigned division]]\n"
" * unused struct member\n"
" * passing parameter by value\n"
" * [[IncompleteStatement|Incomplete statement]]\n"
" * [[charvar|check how signed char variables are used]]\n"
" * variable scope can be limited"
" * condition that is always true/false\n"
" * unusal pointer arithmetic. For example: \"abc\" + 'd'\n"
" * dereferencing a null pointer\n"
" * [[IncompleteStatement|Incomplete statement]]\n";
// optimisations
" * optimisation: detect post increment/decrement\n";
}
};
/// @}