7777 Commits

Author SHA1 Message Date
PKEuS
87e19d2552 Refactorized check for dead pointers after throw:
- Less bailouts for inconclusive checking
- Support for static variables
- Changed severity to warning (error is not certain)
2012-01-21 19:11:06 +01:00
Edoardo Prezioso
b0dac2fa2e Tokenizer::copyTokens: add optional parameter which preserve the line number differences between tokens to be copied. 2012-01-21 17:18:16 +01:00
Ahti Legonkov
78461093f0 Fixed #3531 (When macro definition contains parenthesis, the #defined symbol does not get #defined.) 2012-01-21 12:51:54 +01:00
PKEuS
96ae010e48 - Correctly set Scope::function variable in symboldatabase
- Refactorizations
- Fixed some cppcheck warnings
2012-01-21 10:08:09 +01:00
Edoardo Prezioso
2a2d01a870 Remove some redundant 'errout.str("")' in some checks because it's already done inside tok call. 2012-01-21 00:59:12 +01:00
Zachary Blair
0415444e28 Merge branch 'master' of github.com:danmar/cppcheck 2012-01-19 23:02:33 -08:00
Zachary Blair
b89adff9fd Fixed Ticket #3300 (false negative: doublefree of pointer) 2012-01-19 22:59:54 -08:00
seb777
9be2d1cc62 It is a good practice to clear container after deleted all the items 2012-01-19 12:41:14 +01:00
Daniel Marjamäki
525e7fba20 Fixed #3490 (False positive: sscanf with %c) 2012-01-18 23:57:08 +01:00
Stefan Weil
7607e4c68d Fixed #3519 (Wrong line number in warning charBitOpError) 2012-01-18 13:09:46 +01:00
seb777
0be8af5214 Fix ticket #3530 (Add some windows data types to tokenizer) 2012-01-18 12:57:41 +01:00
Reijo Tomperi
3066bb3430 Start fixing #3515 (Add samples/id/good|bad.cpp)
http://sourceforge.net/apps/trac/cppcheck/ticket/3515
2012-01-17 23:03:21 +02:00
Edoardo Prezioso
9019190a37 Tokenizer: various improvements to code. 2012-01-17 11:51:11 +01:00
Edoardo Prezioso
40739eb3fb Reverted some changes in commits 4b05c3e19f58f5b53e4e306e7fc1d8aae37a6e8f and 4b08b13845609c0ac17ecd7fd20268bb4ea0f490. 2012-01-16 11:44:31 +01:00
Edoardo Prezioso
4b05c3e19f Tokenizer::simplifyIfAddBraces: improve comments; handle independently 'a = { .. };'; reduce use of 'Token::(simple)Match' functions. 2012-01-15 19:53:11 +01:00
Edoardo Prezioso
c5f7db0645 TestTokenizer: Remove redundant ';' in 'inlineasm' testcases. 2012-01-15 19:49:17 +01:00
Edoardo Prezioso
4d239d0bf7 Run astyle. 2012-01-15 19:47:51 +01:00
Edoardo Prezioso
4b08b13845 Tokenizer: reduce usage of Token::Match in some cases. 2012-01-15 15:00:52 +01:00
Edoardo Prezioso
963f6ce3ef Tokenizer: report syntaxError if there's nothing after 'if|for|while ()' and if there's nothing inside round brackets;
TestTokenizer: change test cases accordingly;
TestSimplifyTokens: ditto.
2012-01-15 14:50:01 +01:00
Daniel Marjamäki
a6d96f5b72 Fixed #3496 (false positive: syntax error) 2012-01-15 14:33:53 +01:00
PKEuS
461565c50a Fixed #3517 and #3513 2012-01-15 12:32:02 +01:00
PKEuS
c294b15360 Removed more indendation counters. 2012-01-15 12:31:49 +01:00
Daniel Marjamäki
d891d1ce5d Fixed segfault in TestTokenizer::cpp0xtemplate3 2012-01-15 12:14:47 +01:00
Daniel Marjamäki
7e3735988d TemplateSimplifier : Fixed bug in recent commit. 2012-01-15 11:58:07 +01:00
Daniel Marjamäki
9f493c7c51 GUI: Refactorings. Changed names. Added comments. 2012-01-15 07:59:54 +01:00
Daniel Marjamäki
fe12b280b9 GUI: In the selectfiles dialog use partial selection if some children are checked and others are not 2012-01-15 07:43:50 +01:00
Edoardo Prezioso
4399fca769 Code style: Use 'linkAt' instead of 'tokAt(..)->link'. 2012-01-14 15:21:45 +01:00
Reijo Tomperi
dd18f595b1 Fix #3516 (inaccurate warning: "An unsigned variable will always be positive" (unsigned n; if (n >=0);))
http://sourceforge.net/apps/trac/cppcheck/ticket/3516
2012-01-14 12:50:09 +02:00
Edoardo Prezioso
6a248c35b5 Fixed ticket #3512 (segmentation fault of cppcheck ( 1 *p = const)) 2012-01-14 00:43:58 +01:00
Edoardo Prezioso
37f3aa1528 Fixed ticket #3486 (segmentation fault of cppcheck) 2012-01-13 23:53:53 +01:00
Daniel Marjamäki
0648b3ed5e Fixed #3504 (segmentation fault of cppcheck) 2012-01-13 07:57:12 +01:00
Daniel Marjamäki
47716ee4ca Fixed #3497 (False positive: Uninitialized variable) 2012-01-13 07:26:56 +01:00
Daniel Marjamäki
e43fa83aa4 GUI: SelectFilesDialog: increased the height somewhat 2012-01-13 06:34:07 +01:00
Daniel Marjamäki
bcd04dd79e GUI: SelectFilesDialog: Changed text for OK button to 'Check' 2012-01-13 06:33:10 +01:00
Daniel Marjamäki
d8a1a693d5 GUI: Fixed path match problem that caused extra directories to be selected/unselected 2012-01-13 06:18:56 +01:00
seb777
8754caa36d Fix ticket #3483 (POSIX.1-2008 - obsolete functions)
From POSIX.1-2008 specification (see http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap01.html#tag_22_01_01_04):
- remove obsolete functions ctime, asctime, rand, tmpnam (non reentrant functions check)
- add obsolete base functions (obsolete functions check):
 - rand_r
 - tmpnam, tmpnam_r
 - utime
 - asctime, asctime_r
 - ctime, ctime_r
- update unit tests (non reentrant function)
- update messages (cosmetic) (obsolete functions check)
2012-01-12 22:28:12 +01:00
Reijo Tomperi
da09adc583 Fix #3510 (Improve error message for --suppressions-list)
http://sourceforge.net/apps/trac/cppcheck/ticket/3510
Print additional info to error message if we suspect that multiple files were given.
2012-01-12 22:21:51 +02:00
Daniel Marjamäki
34105cb17e GUI: Use SelectFilesDialog result if OK button is pressed 2012-01-12 07:51:59 +01:00
Daniel Marjamäki
feb187cb02 GUI: Added ui file for the selectfilesdialog 2012-01-11 21:32:52 +01:00
Daniel Marjamaki
833f9af107 GUI: give the SelectFilesDialog a parent widget 2012-01-11 06:26:24 +01:00
Daniel Marjamaki
8df66c9df7 GUI: SelectFilesDialog - tweaked behaviour when unchecking a folder and checking a subfolder 2012-01-11 06:20:30 +01:00
Daniel Marjamaki
9beb38a74d GUI: SelectFilesDialog - set root path to '/'. More files are selectable. 2012-01-11 06:01:14 +01:00
Robert Reif
6f3807d915 add some more windows types 2012-01-10 21:55:24 -05:00
Daniel Marjamäki
fe3d6bf8ea Merge pull request #75 from kimmov/guifixes
GUI fixes + VS 2008 project files update
2012-01-10 13:41:07 -08:00
Daniel Marjamäki
fb248ed270 GUI: New experimental dialog for selecting files to check 2012-01-10 22:39:22 +01:00
Kimmo Varis
cc92f1c432 GUI: Add include paths as relative to project file.
When adding a new include path check if the path is relative path to
the project file's path. If path is relative then remove the begin of
the path making it a relative path in project file.

Ticket: #3019 (GUI: Add project include paths as relative paths)
2012-01-10 22:14:51 +02:00
Kimmo Varis
c74e246e9b GUI: Remeber last path where project file was opened from.
It is handy to remember the last location of the opened project file.
Currently the Open Project -dialog was always opened to location of
the executable file. Which is never the correct place. But last
opened project file location might at least be near the location user
wants to open next.

Ticket: #3493 (GUI: remember last path in Open Project File)
2012-01-10 21:40:11 +02:00
Kimmo Varis
362c5f604c GUI: Fix crash opening project file from command line.
The GUI crashed if the project file was tried to open from the
command line. The project file loading was run before the MRU menu
was created but tried to add a new item to it.
2012-01-10 21:16:47 +02:00
Kimmo Varis
42b7a4fadd Update VS2008 project files. 2012-01-10 19:48:25 +02:00
Reijo Tomperi
be7691c7b4 Refactoring: Move rest of the template simplification into TemplateSimplifier
simplifyCalculations() was temporarily moved into TemplateSimplifier also, it should be moved to a better place.
2012-01-09 21:33:11 +02:00