Daniel Marjamäki
522da8d258
sizeof for numeric constant : disabled check. see ticket #3179
2011-11-27 18:50:21 +01:00
Marek Zmysłowski
e0b50719f4
Fixed #909 (improve check: out of bounds of memchr function and out of bounds check)
2011-11-27 07:54:52 +01:00
PKEuS
71c8669261
Fixed #3311 , #3313 and #3339 (printf format string false positives)
2011-11-27 07:29:09 +01:00
PKEuS
6b1594244e
code cleanups and refactorings
2011-11-26 21:15:16 +01:00
Daniel Marjamäki
50c320ef27
memory leaks: Made leak checking inconclusive instead of experimental
2011-11-25 14:47:45 +01:00
Marek Zmysłowski
a8f2dc1fec
Fixed #1841 (STL: false negative for invalidated iterator after erase)
2011-11-25 07:34:50 +01:00
Marek Zmysłowski
3ae96600b5
Fixed #3212 (Simplify the double pointer cast)
2011-11-25 07:23:54 +01:00
Thomas Jarosch
0722da026f
Run astyle
2011-11-24 10:08:21 +01:00
Richard Quirk
b0574cd02e
Fix ticket #2233 (unused private static function)
2011-11-23 21:28:08 +01:00
Richard Quirk
d76657fec8
Fix false positives for null pointer on exit
2011-11-23 21:27:15 +01:00
Daniel Marjamäki
1b1fd9d39c
Fixed #3196 (False positive: member variable not initialized in constructor (union))
2011-11-22 19:26:00 +01:00
Daniel Marjamäki
add2b3706b
Fixed #3352 (False positive: member variable not initialized (3D array))
2011-11-22 18:45:25 +01:00
Daniel Marjamäki
17f891ad34
Tokenizer::setVarId: Fixed problem with class declarations with inheritance. skip them.
2011-11-21 21:18:56 +01:00
Daniel Marjamäki
9aa8a49677
Tokenizer::setVarId: fixed 'using' bug
2011-11-21 18:04:42 +01:00
Daniel Marjamäki
648fcb9e42
operator= should return reference: Made check inconclusive. See ticket #3296
2011-11-21 08:00:10 +01:00
Daniel Marjamäki
5b5ea29f23
Mismatching format string parameters. Made check experimental. See tickets #3311 , #3313 and #3339
2011-11-21 07:31:06 +01:00
Reijo Tomperi
eebd1393ff
"Internal error. Token::Match called with varid 0." didn't work when error was in a header file. Fixed that.
2011-11-21 00:41:26 +02:00
Reijo Tomperi
91e89380c2
astyle fix
2011-11-20 23:43:55 +02:00
Reijo Tomperi
e0ea4228cd
"Internal error. Token::Match called with varid 0." will now cause check to abort and write a proper error log with filename. Previously filename was empty and format was always xml.
2011-11-20 23:38:37 +02:00
Daniel Marjamäki
004dcf834b
Fixed #3281 (Tokenizer::simplifyKnownVariables : static constant value is not used)
2011-11-20 21:50:26 +01:00
Marek Zmysłowski
9a8c48b36e
Fixed #3255 (Error message for std::string::c_str() is not descriptive)
2011-11-20 19:26:07 +01:00
Edoardo Prezioso
d0d5a2fcd8
Completed ticket #3230 (Refactoring: add function to remove tokens when a label is found.) and fixed ticket #3264 (False positive: Variable is assigned a value that is never used).
2011-11-20 18:37:00 +01:00
Daniel Marjamäki
77925dc629
Class checking: made 'technically function x can be const' inconclusive
2011-11-20 16:54:06 +01:00
Daniel Marjamäki
b26811cdf5
astyle formatting
2011-11-20 16:50:41 +01:00
Richard Quirk
91713ffe84
Fix false positives for %[ in scanf
2011-11-20 16:48:54 +01:00
Daniel Marjamäki
097637a66c
Fixed #3316 (Cppcheck reporting internal errors - code compiles cleanly)
2011-11-20 16:22:21 +01:00
Daniel Marjamäki
b92959809c
Uninitvar: Made checking experimental
2011-11-20 15:19:56 +01:00
Edoardo Prezioso
11dd3c09ce
Change every 'tokAt(1)->' to 'next()->' because 'tokAt(1) == 0' is equivalent to 'next() == 0', hence the equivalent cppcheck crash.
2011-11-20 15:09:57 +01:00
Edoardo Prezioso
42e369a4b4
Change every 'tokAt(..)->link()' to 'linkAt(..)'.
2011-11-20 14:24:27 +01:00
Daniel Marjamäki
690702a742
Memory leaks: Made CheckMemoryLeakInFunction experimental
2011-11-20 14:11:22 +01:00
Daniel Marjamäki
1cf45a5cde
Fixed #3280 (False positive: assigned value that is never used)
2011-11-20 12:09:07 +01:00
Daniel Marjamäki
8c091ff968
Fixed #3340 (Internal error. Token::Match called with varid 0... union is causing problems)
2011-11-20 08:13:28 +01:00
Daniel Marjamäki
c025bf9d57
Fixed #3332 (mismatching comparison: Hard to understand)
2011-11-19 08:38:54 +01:00
Edoardo Prezioso
fa34a14d57
Add more tests for flow control simplification.
2011-11-18 21:10:56 +01:00
Edoardo Prezioso
44e348d018
Add test for the consecutive braces simplification, thanks to thomasjfox's example.
2011-11-18 21:04:24 +01:00
Daniel Marjamäki
033fef36da
improved error message 'mismatching comparison'
2011-11-18 20:07:42 +01:00
Daniel Marjamäki
e78131f9e6
Preprocessor: better handling of #define A 0 => #if A==0. ticket #3331
2011-11-17 19:19:43 +01:00
Marek Zmysłowski
994f08fdf0
Fixed #886 (new check: wrong value passed to isgraph function)
2011-11-17 16:31:16 +01:00
Thomas Jarosch
c317c8979c
Run astyle
2011-11-14 09:21:42 +01:00
Richard Quirk
527236b321
Fix false positives for delete of known nulls
2011-11-13 22:38:34 +01:00
Edoardo Prezioso
5cbfbe31c1
Add removal of consecutive braces, i.e.: '{ { ... } }'->'{ ... }'.
...
Changed a little bit the dead code tests.
2011-11-12 12:07:10 +01:00
Daniel Marjamäki
34e40502c6
Fixed #3314 (cppcheck incorrectly reporting Syntax error.)
2011-11-11 10:53:49 +01:00
Daniel Marjamäki
8bbd535267
Fixed #3290 (False positive: Null pointer dereference (typeid))
2011-11-11 09:58:17 +01:00
Daniel Marjamäki
688e290332
Memory leaks: Fixed false positive for 'char *p = strcpy(malloc(10),str);'
2011-11-11 09:07:02 +01:00
Reijo Tomperi
ca70693055
Astyle fix
2011-11-10 22:32:37 +02:00
Daniel Marjamäki
410b11c00f
Merge pull request #60 from richq/varid0
...
Fix varid 0 with function pointer and virtual methods
2011-11-09 14:28:54 -08:00
Thomas Jarosch
1a454256dc
Cache result of tok->isStandardType()
...
Also contains test order improvements from Johan Samuelson (#3116 ).
Run time went down from 15.15s to 14.95s for the case below.
Benchmarked using these settings:
- CXXFLAGS="-O2 -g -NDEBUG"
- time -p cppcheck.git -q --std=posix --enable=all --inconclusive -Dfoo .
on the "rpm" codebase.
2011-11-09 21:56:30 +01:00
Thomas Jarosch
7202a51065
Add negative test for .c_str() unit test and TODO_ASSERT_EQUALS ( #3266 )
2011-11-09 21:08:53 +01:00
Richard Quirk
f56aa19fac
Fix varid 0 with function pointer and virtual methods
2011-11-09 21:07:55 +01:00
Daniel Marjamäki
2d00cabee1
Fixed #3279 (Token::Match called with varid 0)
2011-11-09 18:49:17 +01:00