Start fixing #3515 (Add samples/id/good|bad.cpp)

http://sourceforge.net/apps/trac/cppcheck/ticket/3515
This commit is contained in:
Reijo Tomperi 2012-01-17 23:03:21 +02:00
parent 9019190a37
commit 3066bb3430
3 changed files with 23 additions and 0 deletions

View File

@ -28,4 +28,5 @@ astyle $style $options test/*.cpp
astyle $style $options test/*.h astyle $style $options test/*.h
astyle $style $options tools/*.cpp astyle $style $options tools/*.cpp
astyle $style $options --recursive "samples/*.c"

View File

@ -0,0 +1,11 @@
int foo(int *p)
{
int a = p;
return a + 4;
}
int main()
{
int i[10];
foo(i);
}

View File

@ -0,0 +1,11 @@
int* foo(int *p)
{
return p + 4;
}
int main()
{
int i[10];
foo(i);
}