Daniel Marjamäki
b8faee9d30
Fixed #3497 (False positive: Uninitialized variable)
2012-01-21 20:42:41 +01:00
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
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
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
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
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
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
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
Kimmo Varis
42b7a4fadd
Update VS2008 project files.
2012-01-10 19:48:25 +02:00
Edoardo Prezioso
2dd53ec966
Fixed ticket #3485 (segmentation fault of cppcheck ( {a:1;}; ))
2012-01-09 16:24:11 +01:00
Edoardo Prezioso
54f54761b4
Fixed ticket #3482 (segmentation fault of cppcheck ( switch(){case} ))
2012-01-09 14:37:20 +01:00
Edoardo Prezioso
57fcde8090
Fixed ticket #3481 (segmentation fault of cppcheck)
2012-01-09 13:39:02 +01:00
Edoardo Prezioso
a951d34aa8
Fixed ticket #3480 (segmentation fault of cppcheck)
2012-01-09 12:48:52 +01:00
Reijo Tomperi
194327048a
Add InternalError and change MathLib to throw it in case of an error.
...
- Previously MathLib errors did not provide a filename, but after this change at least source file name should be printed
and if token is provided, also line number should be printed.
- Change also Token to use InternalError
- Modify Cppcheck-class to catch InternalError instead of Token
- Run dmake to update Makefile
2012-01-08 22:19:44 +02:00
PKEuS
c273d6d31d
Refactorized checkautovariables.cpp. Removed indendation counters.
...
Fixed #3478
2012-01-08 15:32:22 +01:00
Kamil Dudka
e09b0330e4
Class: Don't warn about uninitialized union members because they are often combined with a second variable
2012-01-08 12:17:55 +01:00
Daniel Marjamäki
65ce55e675
Fixed #3472 (false positive: (error) Passing value 0 to log() leads to undefined result)
2012-01-08 12:07:25 +01:00
Daniel Marjamäki
ee55d3294a
Refactoring. Assume that .C files contain C code on case insensitive filesystems.
2012-01-08 10:34:31 +01:00
Daniel Marjamäki
304980848f
Fixed #3473 (False positive: variable is assigned value that is never used (used in return statement))
2012-01-08 08:44:18 +01:00
Daniel Marjamäki
70c83d9ca9
Fixed #3467 (False positive: Variable is not assigned a value (new))
2012-01-08 08:31:00 +01:00
Reijo Tomperi
93e3e7361e
In unix .C is considered C++. Changed isC() and isCPP() to work like they were before refactoring.
2012-01-07 10:47:15 +02:00
Daniel Marjamäki
36797a97ef
Symbol database: Fixed comments
2012-01-07 09:37:38 +01:00
Daniel Marjamäki
6a63104743
Fixed #3320 (False positive: Member variable is not initialized in the constructor (namespaces).)
2012-01-07 09:28:26 +01:00
Reijo Tomperi
e91d239ea5
Refactor: Move file extension checks from Tokenizer to Path class. This has also functional change as now also file.JAVA is considered a Java file.
2012-01-06 21:56:28 +02:00
Daniel Marjamäki
5ae7c4506f
Fixed #3015 (xml-style error output when running testrunner on particular tests)
2012-01-06 09:09:46 +01:00
Daniel Marjamäki
73d9dc870e
TestRunner: Make sure no xml output is reported when running TestToken ( #3015 )
2012-01-06 09:03:23 +01:00
Daniel Marjamäki
bd8c21fc6b
Refactoring: Made Preprocessor::simplifyCondition nonstatic
2012-01-06 08:42:07 +01:00
Daniel Marjamäki
66472b09c0
Refactoring: Made Preprocessor::match_cfg_def nonstatic
2012-01-06 08:15:48 +01:00
Daniel Marjamäki
94d220e370
Refactoring: Made Preprocessor::getcode nonstatic
2012-01-06 08:01:50 +01:00
Daniel Marjamäki
07776e90ad
Preprocessor: cleanup
2012-01-05 18:37:15 +01:00
Jussi Lehtola
55b65718c7
fix gcc-4.7 compiler error (missing include)
2012-01-05 14:36:30 +01:00
Edoardo Prezioso
a7029291fd
Tokenizer::simplifyGoto: process also derived class/structs.
2012-01-04 17:08:53 +01:00
Edoardo Prezioso
6f9cd110d0
Improve Tokenizer: improve 'simplifyDoublePlusAndDoubleMinus' when there are negative numbers.
2012-01-04 13:45:27 +01:00
Edoardo Prezioso
75fbe310ff
Extract various functions inside the Tokenizer class and fix tokenization of 'return __LINE__ ;'.
2012-01-04 12:57:58 +01:00
PKEuS
eabdc9082e
Fixed false positives related to %*[] in scanf format string ( #3468 )
2012-01-04 11:22:42 +01:00
Edoardo Prezioso
8d84e5f852
testrunner: assert-like functions should take linenr parameter as a 'unsigned int' (maybe in the future these should be converted to 'size_t'?);
...
fix discrepancy between 'todoAssertEquals' and 'AssertEquals' so that the parameters 'expected, wanted, actual and current' are 'long long' types.
2012-01-03 15:48:03 +01:00