added 'todo.txt'
This commit is contained in:
parent
d9fc9762b8
commit
c366278b48
23
tests.cpp
23
tests.cpp
|
@ -29,6 +29,7 @@ static void operator_eq();
|
||||||
static void memleak_in_function();
|
static void memleak_in_function();
|
||||||
static void memleak_in_class();
|
static void memleak_in_class();
|
||||||
static void division();
|
static void division();
|
||||||
|
static void unused_variable();
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -60,6 +61,9 @@ int main()
|
||||||
// Check for dangerous division.. such as "svar / uvar". Treating "svar" as unsigned data is not good
|
// Check for dangerous division.. such as "svar / uvar". Treating "svar" as unsigned data is not good
|
||||||
division();
|
division();
|
||||||
|
|
||||||
|
// unused variable..
|
||||||
|
unused_variable();
|
||||||
|
|
||||||
std::cout << "Success Rate: "
|
std::cout << "Success Rate: "
|
||||||
<< SuccessCount
|
<< SuccessCount
|
||||||
<< " / "
|
<< " / "
|
||||||
|
@ -693,3 +697,22 @@ static void division()
|
||||||
|
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static void unused_variable()
|
||||||
|
{
|
||||||
|
// Unused private member variable...
|
||||||
|
const char test1[] = "class Fred\n"
|
||||||
|
"{\n"
|
||||||
|
"private:\n"
|
||||||
|
" int i;\n"
|
||||||
|
"public:\n"
|
||||||
|
" Fred();\n"
|
||||||
|
"};\n"
|
||||||
|
"Fred::Fred()\n"
|
||||||
|
"{\n"
|
||||||
|
" i = 0;\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
|
||||||
|
Userdefined types
|
||||||
|
|
||||||
|
I think this needs to be handled better.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Unused function / variable
|
||||||
|
|
||||||
|
If the user provides "--recursive" there should be
|
||||||
|
warnings for unused functions and variables.
|
||||||
|
|
||||||
|
Check if all members in the public section of a class
|
||||||
|
are used externally.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dead pointers
|
||||||
|
|
||||||
|
Check for dead pointers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Buffer overruns
|
||||||
|
|
||||||
|
When writing to struct members
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue