Commit Graph

101 Commits

Author SHA1 Message Date
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
Daniel Marjamäki 419ae2a135 Uninitialized variables: Fixed false positive in new checking when variable is initialized in condition 2011-12-14 17:17:24 +01:00
Daniel Marjamäki ba463295c2 Uninitialized variables: improved check to detect more errors. Ticket: #3369 2011-12-14 06:00:17 +01:00
Daniel Marjamäki c7ce87d060 Uninitialized variables: Fixed false positives for break/continue/throw 2011-12-14 05:45:52 +01:00
Daniel Marjamäki 458fa0874a Uninitialized variables: Started writing a new check. Ticket: #3369 2011-12-13 21:57:27 +01:00
PKEuS c9f5117cf5 Fixed #3407 (False positive: (inconclusive) Found duplicate branches for if and else. (inline assembler)) 2011-12-13 21:42:38 +01:00
Edoardo Prezioso 767413adad 1)internal check found a 'findmatch' with simple string argument;
2)Style: uniform 'while (...)' when inside it there's an assignment;
3)Replace '0' with 'NULL' where there's comparison with a pointer.
2011-12-01 12:04:47 +01:00
Daniel Marjamäki 414e0ecc3c Uninitvar: Reactivated the checking 2011-11-30 18:57:52 +01:00
Daniel Marjamäki b92959809c Uninitvar: Made checking experimental 2011-11-20 15:19:56 +01:00
Edoardo Prezioso 42e369a4b4 Change every 'tokAt(..)->link()' to 'linkAt(..)'. 2011-11-20 14:24:27 +01:00
Edoardo Prezioso 2c64d299ca Change every 'tokAt(...)->str()' to 'strAt(...)'. 2011-11-13 13:10:59 +01:00
Daniel Marjamäki f7fe665b00 Fixed #3231 (False positive: uninitialized variable '({...})') 2011-10-30 18:19:09 +01:00
Daniel Marjamäki 7035d4cdd2 astyle formatting 2011-10-30 17:41:05 +01:00
Daniel Marjamaki 71f08d0a66 Fixed #3222 (false positive: Uninitialized variable with function pointer) 2011-10-30 17:22:30 +01:00
Daniel Marjamäki 0d1046eeeb Merge pull request #51 from richq/explicit
Explicit constructors
2011-10-30 01:38:26 -07:00