Commit Graph

115 Commits

Author SHA1 Message Date
Daniel Marjamäki fc7f78244e Fixed #3708 (False positive: uninitialized variable (allocation, unknown nonpointer type)) 2012-05-14 18:34:39 +02:00
PKEuS db914d7185 Fixed compiler errrors and warnings mentioned in #3783 2012-05-07 06:34:47 -07:00
PKEuS dd5e9aa454 Make use of recently implemented Token::type() functionality 2012-04-25 09:56:07 +02:00
Daniel Marjamäki fb6c7f33f0 Fixed #3707 (Uninitialized variable with operator >> and templates) 2012-04-24 19:50:54 +02:00
PKEuS 710fefeef0 Refactorizations:
- Replaced some indendation counters by Token::link() or usage of symbolDatabase
- Use Token::nextArgument() to jump to target parameter
2012-04-21 23:05:37 +02:00
Daniel Marjamäki 2757229064 Fixed #3666 (False positive: Uninitialized variable (taking address)) 2012-03-16 17:28:05 +01:00
Daniel Marjamäki 47c7e346aa Uninitialized variables: Another fix for false positives when it's known that inner conditions are true 2012-02-06 19:26:28 +01:00
Daniel Marjamäki d6a887e1f9 Uninitialized variables: Fixed false positives when goto is simplified and inner condition is known to be true/false 2012-02-06 07:32:29 +01:00
PKEuS 5c2af0b2e3 - initialising std::string with 0 in initialisation list is partially detected in nullpointer check (#3520)
- executionpath checking makes use of symboldatabase
- CheckExceptionSafety::checkRethrowCopy makes use of symboldatabase
2012-01-26 16:50:59 +01:00
PKEuS 42a75692d4 Improved nullpointer check:
- More accurate checking for dereferences and non-dereferences
- improved checking for nullpointer dereferences after return statement
- Supports pointer dereferences by std::string
- Code optimization/refactorization
2012-01-25 15:16:22 +01:00
Daniel Marjamäki b8faee9d30 Fixed #3497 (False positive: Uninitialized variable) 2012-01-21 20:42:41 +01:00
PKEuS c294b15360 Removed more indendation counters. 2012-01-15 12:31:49 +01:00
Edoardo Prezioso 37f3aa1528 Fixed ticket #3486 (segmentation fault of cppcheck) 2012-01-13 23:53:53 +01:00
Daniel Marjamäki 47716ee4ca Fixed #3497 (False positive: Uninitialized variable) 2012-01-13 07:26:56 +01:00
Daniel Marjamäki 01759b03f9 Fixed #3463 (Uninitialized variable variable pointer) 2012-01-02 11:25:13 +01:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
Edoardo Prezioso b2f8161862 Rewrite fix of ticket #3415 (Segmentation fault in new check for uninitialized variables):
new simplify: 'code ; ({ some_code ; });' to 'code ; some_code ;';
remove the sanity check in checkunusedvar, so when it crashes again it's easy to spot a bigger problem;
'internal' reported 'Token::Match' with simple pattern.

'Tokenizer::tokenize()' refactorings:
make one loop with many simple simplifications instead of many loops with one simplification.
some style changes.
2011-12-28 16:55:59 +01:00
Daniel Marjamäki 91874214d8 Refactoring: Added utility function that determine if scope ends with a call to a noreturn function 2011-12-27 18:00:12 +01:00
Daniel Marjamäki 32ed84f4c5 Uninitialized variables: Fixed false positives when using typeof() 2011-12-27 17:03:48 +01:00
Daniel Marjamäki 7c606c4e3b Uninitialized variables: Fixed false positives for such code: 'if (cond1) { a=0; } if (cond1) { if (cond2) { use_a; } }' 2011-12-27 13:16:16 +01:00
Daniel Marjamäki f6b201bb3b Uninitialized variables: Fixed false positives when pointer is dereferenced in unexpanded macro 2011-12-27 10:18:49 +01:00
Daniel Marjamäki fdb6ee2ad7 Uninitialized variables: Fix false positives related to for loop 2011-12-27 08:18:05 +01:00
Daniel Marjamäki 5bac8eca37 Uninitialized variables: Fixed false positives (caused by my 'check more variables' commit) 2011-12-26 22:14:52 +01:00
Daniel Marjamäki 5aaec7adc5 Uninitialized variables: Better handling of variable usage in condition 2011-12-26 18:56:40 +01:00
Daniel Marjamäki 59cd099ba7 Uninitialized variables: Fixed false positives caused by recent commit when potentially uninitialized variable is read in condition 2011-12-26 18:32:42 +01:00
Daniel Marjamäki 481fa532a8 Uninitialized variables: Fixed false positives caused by recent improvement when variable is potentially initialized in else block. 2011-12-26 18:17:13 +01:00
Daniel Marjamäki c56e2e7cf9 Uninitialized variables: Fixed false positives for unconditional inner scopes 2011-12-26 17:52:32 +01:00
Daniel Marjamäki 025518c474 Uninitialized variables: Fixed false positives when goto is used. 2011-12-26 16:46:10 +01:00
Daniel Marjamäki 8eb067358c Uninitialized variables: check more variables 2011-12-26 14:01:46 +01:00
Daniel Marjamäki f48edb63a3 Uninitialized variables: Improved checking when there are multiple if/else and a certain path causes an error 2011-12-26 12:36:35 +01:00
Daniel Marjamäki ba5558748d Uninitialized variables: Fixed false 'dangerous usage of strncpy' positive when resulting string is used by strncpy 2011-12-23 08:44:28 +01:00
Daniel Marjamäki f09a5b408b Uninitialized variables: Fixed false positives when sizeof is used in condition. Ticket: #3369 2011-12-17 16:08:55 +01:00
Daniel Marjamäki fe8393aafc Uninitialized variables: Fixed false positives in sizeof. Ticket: #3369 2011-12-17 09:51:45 +01:00
Daniel Marjamäki dfedb920f8 Uninitialized variables: Fixed false positive when address of variable is taken inside = { .. }. Ticket: #3369 2011-12-17 07:56:46 +01:00
Daniel Marjamäki 0572321572 Fixed #3423 (Uninitialized variable in operator>>) 2011-12-16 20:34:44 +01:00
Daniel Marjamäki 5f1fadec7b Uninitialized variables: Fixed false positives when many 'if' are used. Ticket: #3369 2011-12-16 19:56:32 +01:00
Daniel Marjamäki 1f329d7b41 Uninitialized variables: Fixed false positive for x 'a[x=1]'. Ticket: #3369 2011-12-16 18:12:47 +01:00
Daniel Marjamäki e723ef0569 Uninitialized variables: Fix false positives for '= { .. }'. Ticket: #3369 2011-12-16 18:04:10 +01:00
Daniel Marjamäki d2d7e25f3f Uninitialized variables: Fixed false positive in for condition. Ticket: #3369 2011-12-15 20:48:26 +01:00
Daniel Marjamäki 40f2f4f7f6 Uninitialized variables: Fixed false positives when there are assembler code. Ticket: #3369 2011-12-15 20:29:57 +01:00
Daniel Marjamäki 167530bf60 Uninitialized variable: Fixed test failure. Ticket: #3369 2011-12-15 20:15:37 +01:00
Daniel Marjamäki f797307edc Uninitialized variables: Fix false positive if variable is used after return (goto). Ticket: #3369 2011-12-15 20:05:11 +01:00
Daniel Marjamäki 10228881c7 Uninitialized variables: Fixed false positives when taking address. Ticket: #3369 2011-12-15 19:38:06 +01:00
Daniel Marjamäki 6221145be8 Fixed #3414 (false positive: (error) Uninitialized variable: SOutput) 2011-12-15 18:30:59 +01:00
Daniel Marjamäki 005b1cff61 Fixed #3417 (False positive: Uninitialized variable when conditionally set) 2011-12-15 18:15:58 +01:00
Daniel Marjamäki 3a432fa959 Uninitialized variables: better handling of initialization with >>. Ticket: #3369 2011-12-15 16:55:55 +01:00
Daniel Marjamäki b3c35d4b32 Fixed #3415 (Segmentation fault in new check for uninitialized variables) 2011-12-15 16:49:14 +01:00
Daniel Marjamäki 295f486cde Uninitialized variables: Detect more errors when variable is given as array index. Ticket: #3369 2011-12-14 19:56:58 +01:00
Daniel Marjamäki 63e2f64b9c Uninitialized variables: Fixed false positives for loops. Ticket: #3369 2011-12-14 18:54:03 +01:00
Daniel Marjamäki 8e3e634ce0 Uninitialized variables: Detect more errors. Ticket: #3369 2011-12-14 18:28:30 +01:00