Updated the tests

This commit is contained in:
Daniel Marjamäki 2007-06-08 18:32:23 +00:00
parent 9da999b53f
commit f36ab6dc61
34 changed files with 39 additions and 6 deletions

View File

@ -0,0 +1 @@
[testbufferoverrun1\testbufferoverrun1.cpp:7]: Array index out of bounds

View File

@ -0,0 +1 @@
[testbufferoverrun2\testbufferoverrun2.cpp:7]: Buffer overrun

View File

View File

@ -0,0 +1 @@
[testbufferoverrun4\testbufferoverrun4.cpp:6]: Buffer overrun

View File

@ -0,0 +1 @@
[testbufferoverrun5\testbufferoverrun5.cpp:8]: Array index out of bounds

View File

@ -0,0 +1 @@
[testbufferoverrun6\testbufferoverrun6.cpp:8]: Array index out of bounds

View File

@ -0,0 +1,2 @@
[testdangerousfunc1\testdangerousfunc1.cpp:4]: Found 'gets'. You should use 'fgets' instead
[testdangerousfunc1\testdangerousfunc1.cpp:7]: Found 'scanf'. You should use 'fgets' instead

View File

@ -1 +0,0 @@
[testdelete1\testdelete1.cpp:6]: Redundant condition. It is safe to deallocate a NULL pointer

0
testfunc2/warn.msg Normal file
View File

0
testfunc3/warn.msg Normal file
View File

1
testfunc4/warn.msg Normal file
View File

@ -0,0 +1 @@
[testfunc4\testfunc4.cpp:5]: Invalid radix in call to strtol or strtoul. Must be 0 or 2-36

View File

@ -1 +0,0 @@
[testfunc5\testfunc5.cpp:12]: Possible bug. Both 'f2' and 'f1' uses strtok.

1
testfunc5/warn.msg Normal file
View File

@ -0,0 +1 @@
[testfunc5\testfunc5.cpp:12]: Possible bug. Both 'f2' and 'f1' uses strtok.

View File

@ -1 +0,0 @@
[testfunc6\testfunc6.cpp:6]: Found "if (condition) var = true;", it can be rewritten as "var |= (condition);"

1
testfunc6/warn.msg Normal file
View File

@ -0,0 +1 @@
[testfunc6\testfunc6.cpp:6]: Found "if (condition) var = true;", it can be rewritten as "var |= (condition);"

View File

@ -1,3 +1,2 @@
[testh1\testh1.cpp:2]: The included header 'testh1\testh1.h' is not needed
[testh1\testh1.h:5]: Found implementation in header
[testh1\testh1.h:11]: Found implementation in header

0
testh3/err.msg Normal file
View File

7
testh3/h1.h Normal file
View File

@ -0,0 +1,7 @@
#include "h2.h"
class class1 : class2
{ };

4
testh3/h2.h Normal file
View File

@ -0,0 +1,4 @@
class class2
{ };

2
testh3/testh3.cpp Normal file
View File

@ -0,0 +1,2 @@
#include "h1.h"

1
testh3/warn.msg Normal file
View File

@ -0,0 +1 @@
[testh3\testh3.cpp:2]: The included header 'testh3\h1.h' is not needed

View File

@ -1 +0,0 @@
[testif1\testif1.cpp:5]: Found "if (condition);"

1
testif1/warn.msg Normal file
View File

@ -0,0 +1 @@
[testif1\testif1.cpp:5]: Found "if (condition);"

View File

@ -1 +0,0 @@
[testif2\testif2.cpp:6]: The condition is always False

1
testif2/warn.msg Normal file
View File

@ -0,0 +1 @@
[testif2\testif2.cpp:6]: The condition is always False

0
testif3/warn.msg Normal file
View File

0
testif4/warn.msg Normal file
View File

1
testmemcheck1/warn.msg Normal file
View File

@ -0,0 +1 @@
[testmemcheck1\testmemcheck1.cpp:5]: Mismatching allocation and deallocation 'a'

0
testmemcheck2/warn.msg Normal file
View File

0
testmemcheck3/warn.msg Normal file
View File

1
testmemcheck4/warn.msg Normal file
View File

@ -0,0 +1 @@
[testmemcheck4\testmemcheck4.cpp:9]: Memory leak:str

0
testmemcheck5/warn.msg Normal file
View File

2
testmemset1/warn.msg Normal file
View File

@ -0,0 +1,2 @@
[testmemset1\testmemset1.cpp:28]: Using 'memset' on class.
[testmemset1\testmemset1.cpp:34]: Using 'memset' on struct that contains a 'std::string'

9
updateall.bat Normal file
View File

@ -0,0 +1,9 @@
@ECHO OFF
FOR /D %%s IN (test*) DO (
cppcheck %%s\%%s.cpp 2> %%s\err.msg
cppcheck -w %%s\%%s.cpp 2> %%s\warn.msg
)