makulik
1e8fc71f8e
Solution for ticket #3353 'Allow explicit undef's for configuration'
...
Signed-off-by: makulik <g-makulik@t-online.de>
2011-11-30 20:24:01 +01:00
Daniel Marjamäki
414e0ecc3c
Uninitvar: Reactivated the checking
2011-11-30 18:57:52 +01:00
Daniel Marjamäki
0d48cd390b
astyle formatting
2011-11-29 20:44:23 +01:00
Edoardo Prezioso
5c90c69ccf
Fixed ticket #3366 (Build breakage)
2011-11-29 19:46:36 +01:00
Daniel Marjamäki
b61c01c6a4
Fixed #3356 (false positive: (warning) Comparison of a boolean with integer that is neither 1 nor 0)
2011-11-29 18:14:57 +01:00
Daniel Marjamäki
b538f49a6e
Merge pull request #61 from richq/sameexpr
...
Fix for #3317 - same expression on both side of '&&' false positives
2011-11-29 08:50:02 -08:00
PKEuS
be0acad11f
Improvements to Nullpointer dereference on function call check:
...
printf format string parser improved (similar to my recent patch
on the argument counter), frexp/modf supported (#1572 ), Code
cleanup
2011-11-28 22:32:07 +02:00
Daniel Marjamäki
39af75abb4
Fixed #3303 (false positive: memory leak (reference count))
2011-11-28 20:08:29 +01:00
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
2d3a232ef6
code refactoring
2011-11-27 07:30:58 +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
PKEuS
6b6f780057
code cleanups and refactorings
2011-11-26 21:02:04 +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
3ae96600b5
Fixed #3212 (Simplify the double pointer cast)
2011-11-25 07:23:54 +01:00
Thomas Jarosch
5025d1019f
Use Token::simpleMatch instead of Token::Match
...
"--enable=internal" reported:
[lib/tokenize.cpp:3563]: (warning) Found simple pattern inside Token::Match() call: ") ;"
2011-11-24 10:11:45 +01:00
Richard Quirk
d28cf42d4c
Fix ticket #3317 (same expression false positives)
...
Add a check for function calls that have no side effects. That means
known const methods and a list including strcmp, strlen, etc.
If the function is not known to be side effect-free then no style
warning is given.
Add test cases for the duplicate expressions.
2011-11-23 21:39:03 +01:00
Richard Quirk
511ac0ab1f
Remove false positives for nested logic
2011-11-23 21:39:03 +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
2e08c8c5b1
DJGPP: Fixed a few compiler errors by using std::size_t instead of size_t
2011-11-22 21:14:14 +01:00
Daniel Marjamäki
345220b36f
removed unused include
2011-11-22 19:54: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
0dd05e0d56
Fixed #3347 (False positive: unused function (taking address))
2011-11-21 19:12:54 +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
7d7d68b192
Make --debug-fp work with new exception also.
2011-11-21 00:04:09 +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
6889a28d31
1) Run runastyle;
...
2) Clarify some comments in 'Tokenizer::simplifyFlowControl' and in 'Tokenizer::eraseDeadCode';
3) Add some 'const' variables inside 'Tokenizer::eraseDeadCode'.
2011-11-20 19:06:55 +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
Edoardo Prezioso
a32b05197d
Change every 'tokAt(1)' to 'next()' and every 'tokAt(-1)' to 'previous()'.
...
Added a safety check to ensure that a 'previous()' call doesn't crash (not sure if it's needed or not).
2011-11-20 15:59:37 +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
2a5b4b1842
Fixed #3328 (False negative: out of bounds)
2011-11-19 15:28:06 +01:00