Slava Semushin
f38530fb31
test/testbufferoverrun.cpp: improve test cases.
2009-08-02 19:29:37 +07:00
Slava Semushin
ed86eda07d
Fixed ticket #549 (Tokenizer: improve calculation simplification)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/549
2009-08-02 15:45:33 +07:00
Slava Semushin
342acaaaf2
Fixed #547 (index out of bounds not detected when addition used as array index)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/547
2009-08-02 14:59:02 +07:00
Slava Semushin
0445edf6fe
Fixed #542 (Tokenizer: allow numbers in templates parameters)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/542
2009-08-01 23:17:35 +07:00
Slava Semushin
0e2273833e
Fixed ticket #539 (Tokenizer: don't replace constants variables with varid 0)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/539
2009-08-01 20:57:54 +07:00
Daniel Marjamäki
b5d172b6e9
preprocessor: fixed problem in Preprocessor::expandMacros when macro argument is for example 'unsigned long'
2009-08-01 14:55:45 +02:00
Daniel Marjamäki
e6713e9774
null pointers: fixed a false positive
2009-08-01 11:30:37 +02:00
Daniel Marjamäki
b7ffcf53ba
Fixed #511 (false positive, memory leak when using 'var = ({});')
2009-07-31 23:42:21 +02:00
Slava Semushin
8588012df7
Fixed #521 (Tokenizer: improve static variable detection)
...
Also change cppcheck default behavior to don't show "If you see this,
there is a bug" message for each variable without varId. This feature
was very helpful for developers but may annoying users.
http://sourceforge.net/apps/trac/cppcheck/ticket/521
2009-08-01 00:40:36 +07:00
Daniel Marjamäki
2b26a320f0
astyle formatting
2009-07-31 14:01:50 +02:00
Daniel Marjamäki
2d9e4e1a73
null pointers: detect when there are possible null pointer dereferencing when looping through a linked list both in inner and outer loops at the same time
2009-07-31 10:49:43 +02:00
Daniel Marjamäki
228e926654
null pointers: Added a todo testcase
2009-07-30 21:57:23 +02:00
Slava Semushin
347802f819
Fixed ticket #503 (Dereferencing after erase() not work if we try to get access to member)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/503
2009-07-31 00:49:38 +07:00
Slava Semushin
5db677bc30
Fixed ticket #523 (Tokenizer: set varId for types with long namespaces)
...
FIXME: skip namespaces by the best way.
http://sourceforge.net/apps/trac/cppcheck/ticket/533
2009-07-31 00:40:41 +07:00
Slava Semushin
681b836389
Fixed ticket #532 (Tokenizer: set varId for types which have comma in template parameter)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/532
2009-07-31 00:25:26 +07:00
Daniel Marjamäki
d06e669017
Preprocessor: Speedup of the match_cfg_def function
2009-07-30 10:10:34 +02:00
Reijo Tomperi
2fa3b4ce60
Added more tests to test case TestSimplifyTokens::ifassign1
2009-07-30 01:39:28 +03:00
Reijo Tomperi
b56fdb83da
Fixed ticket #529 (Tokenizer: simplify if((x==0)))
...
http://sourceforge.net/apps/trac/cppcheck/ticket/529
2009-07-30 00:37:01 +03:00
Daniel Marjamäki
050b85c5eb
memory leak for struct member: fixed false positive when the struct pointer is stored away
2009-07-29 11:38:20 +02:00
Daniel Marjamäki
4e66dc105e
null pointers: Fixed false positive when 'do' are used
2009-07-29 11:17:22 +02:00
Slava Semushin
367efe31ea
Fixed ticket #524 (Containers range check shouldn't stop at first founded error)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/524
2009-07-29 03:55:23 +07:00
Slava Semushin
8b0c1daf98
Fixed ticket #522 (Tokenizer: recognize comma in container with STL type declaration)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/522
2009-07-29 02:46:33 +07:00
Slava Semushin
f50aa1e188
Fixed ticket #520 (Tokenizer: properly set varId for containers with STL types)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/520
2009-07-29 00:54:13 +07:00
Slava Semushin
c8caefa94c
Fixed ticket #519 (Tokenizer converts commas in for-loops)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/519
2009-07-28 23:40:15 +07:00
Slava Semushin
600f3a834d
Fixed ticket #514 (false positive:: memory leak when using comma near delete[])
...
http://sourceforge.net/apps/trac/cppcheck/ticket/514
2009-07-28 02:13:08 +07:00
Slava Semushin
37fe631639
test/testautovariables.cpp: renamed some testcases.
...
Make it readable.
No functional change.
2009-07-28 00:36:56 +07:00
Slava Semushin
82ae0e305b
checkautovariables: added newlines to make code more readable.
...
No code change.
2009-07-28 00:34:17 +07:00
Slava Semushin
bb4b2b707c
Fixed ticket #517 (False positive for extern variables: return of the address of an auto-variable)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/517
2009-07-28 00:32:01 +07:00
Reijo Tomperi
358aa5be8d
Improve test case TestSimplifyTokens::comma_keyword
2009-07-27 00:08:18 +03:00
Daniel Marjamäki
b4a6d74e42
astyle formatting
2009-07-26 22:13:08 +02:00
Slava Semushin
6c022798ea
Fixed ticket #499 (buffer overflow not detected when using macros)
...
sprintf() buffer overrun detection works wrong due to typo (since time
when it was added in commit a604f56f19
).
Also reports buffer overrun when sprintf() writes bytes equal to
buffer size -- in this case off-by-one error appears.
http://sourceforge.net/apps/trac/cppcheck/ticket/499
2009-07-26 19:29:46 +07:00
Slava Semushin
a73346e889
Fixed ticket #496 (Tokenizer: simplify statements with "," better)
...
https://sourceforge.net/apps/trac/cppcheck/ticket/496
2009-07-26 18:03:11 +07:00
Reijo Tomperi
a07b7635c0
Fix ticket #265 (Log a warning when an include file is not found)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/265
2009-07-25 22:10:30 +03:00
Daniel Marjamäki
a6d696bf40
Fixed #504 (false positive: null pointer dereference)
2009-07-25 20:36:02 +02:00
Daniel Marjamäki
b172d62cae
Added more tests to the TestPreprocessor::match_cfg_def ( #505 )
2009-07-25 17:04:13 +02:00
Daniel Marjamäki
f877cd2db1
Preprocessor: Added todo test case for better evaluation of #if conditions
2009-07-25 16:22:42 +02:00
Daniel Marjamäki
dacaff824c
Fixed #501 (Preprocessor should read open configurations that are defined within the file)
2009-07-25 13:58:34 +02:00
Slava Semushin
8643936e0c
Fixed ticket #500 (Tokenizer: simplify the "(p != NULL)" conditions)
...
Also teach simplifyIfNot() to handle variables like Foo::var.
https://sourceforge.net/apps/trac/cppcheck/ticket/500
2009-07-25 18:23:03 +07:00
Slava Semushin
88d7c598e3
test/testtokenize.cpp: use tokenizeAndStringify() function.
...
Instead of self-written code.
No functional change.
2009-07-25 16:41:16 +07:00
booga
9fa8c0ee9c
astyle FTW (should have read about that sooner)
2009-07-24 19:23:30 -04:00
booga
52e2e775b2
Fix #476 STL Container checks.
...
Fix #473 Add post increment check for STL objects and Classes.
2009-07-24 18:36:15 -04:00
Daniel Marjamäki
9136d8cf80
Tokenizer: simplify return statements - remove redundant parantheses
2009-07-24 21:55:35 +02:00
Daniel Marjamäki
6bb85703f6
memory leaks: fixed false positive for struct members - better handling of if/else
2009-07-24 09:05:40 +02:00
Daniel Marjamäki
73c028bdb7
memory leaks: added a todo test case for struct members when using if-else
2009-07-23 22:29:31 +02:00
Daniel Marjamäki
5b81c92a14
null pointers: fixed false positives when checking if pointer is null at many locations ( #485 )
2009-07-23 19:59:29 +02:00
Daniel Marjamäki
06c8ff9d0d
null pointers: fixed false positives ( #49 )
2009-07-23 19:02:14 +02:00
Daniel Marjamäki
565ac2fca6
Fixed #493 (Memory leak: False positive when using the exit(0))
2009-07-23 16:30:30 +02:00
Daniel Marjamäki
d0f1d885ed
null pointers: dereferencing a pointer and then checking if it's null ( #49 )
2009-07-23 14:13:46 +02:00
Daniel Marjamäki
024778d6eb
tokenizer: simplify '?:' better when the condition is always true
2009-07-23 10:12:02 +02:00
Daniel Marjamäki
9b2dd8c7eb
Preprocessor: Better evaluation of conditions such as '#if defined A || defined B' ( #469 )
2009-07-22 20:11:27 +02:00