doc: refactoring of the docs for CheckOther
This commit is contained in:
parent
7f6fcc6556
commit
6aea2faacd
|
@ -147,12 +147,17 @@ public:
|
||||||
|
|
||||||
void getErrorMessages()
|
void getErrorMessages()
|
||||||
{
|
{
|
||||||
|
// error
|
||||||
|
sprintfOverlappingDataError(0, "varname");
|
||||||
|
udivError(0);
|
||||||
|
nullPointerError(0, "pointer");
|
||||||
|
zerodivError(0);
|
||||||
|
|
||||||
|
// style
|
||||||
cstyleCastError(0);
|
cstyleCastError(0);
|
||||||
redundantIfDelete0Error(0);
|
redundantIfDelete0Error(0);
|
||||||
redundantIfRemoveError(0);
|
redundantIfRemoveError(0);
|
||||||
dangerousUsageStrtolError(0);
|
dangerousUsageStrtolError(0);
|
||||||
sprintfOverlappingDataError(0, "varname");
|
|
||||||
udivError(0);
|
|
||||||
udivWarning(0);
|
udivWarning(0);
|
||||||
unusedStructMemberError(0, "structname", "variable");
|
unusedStructMemberError(0, "structname", "variable");
|
||||||
passedByValueError(0, "parametername");
|
passedByValueError(0, "parametername");
|
||||||
|
@ -162,8 +167,8 @@ public:
|
||||||
variableScopeError(0, "varname");
|
variableScopeError(0, "varname");
|
||||||
conditionAlwaysTrueFalse(0, "true/false");
|
conditionAlwaysTrueFalse(0, "true/false");
|
||||||
strPlusChar(0);
|
strPlusChar(0);
|
||||||
nullPointerError(0, "pointer");
|
|
||||||
zerodivError(0);
|
// optimisations
|
||||||
postIncrementError(0, "varname", true);
|
postIncrementError(0, "varname", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,19 +180,27 @@ public:
|
||||||
std::string classInfo() const
|
std::string classInfo() const
|
||||||
{
|
{
|
||||||
return "Other checks\n"
|
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"
|
" * C-style pointer cast in cpp file\n"
|
||||||
" * redundant if\n"
|
" * redundant if\n"
|
||||||
" * bad usage of the function 'strtol'\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"
|
" * [[CheckUnsignedDivision|unsigned division]]\n"
|
||||||
" * unused struct member\n"
|
" * unused struct member\n"
|
||||||
" * passing parameter by value\n"
|
" * passing parameter by value\n"
|
||||||
|
" * [[IncompleteStatement|Incomplete statement]]\n"
|
||||||
" * [[charvar|check how signed char variables are used]]\n"
|
" * [[charvar|check how signed char variables are used]]\n"
|
||||||
|
" * variable scope can be limited"
|
||||||
" * condition that is always true/false\n"
|
" * condition that is always true/false\n"
|
||||||
" * unusal pointer arithmetic. For example: \"abc\" + 'd'\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";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/// @}
|
/// @}
|
||||||
|
|
Loading…
Reference in New Issue