Commit Graph

7226 Commits

Author SHA1 Message Date
PKEuS 3bdcf68990 Fixed false positive in CheckUnusedVar::checkFunctionVariableUsage(): Bailout when break; is encountered
See also: https://sourceforge.net/p/cppcheck/discussion/general/thread/1c169dc5/
2016-07-07 18:27:31 +02:00
Simon Martin 40eacb19b1 Ticket #7565: Handle numbers with several C++14 integer separators. 2016-07-01 23:24:28 +02:00
umanamente 0f11007c19 Fixed #7083 (false positive: typedef and initialization with strings) 2016-06-21 22:42:46 +02:00
PKEuS dde6f5eaea Do not warn about alloca() in C89 mode (#7558) 2016-06-20 09:30:41 +02:00
PKEuS 721bc32b2d Fixed crash in CheckVaarg::va_list_usage() (#7559) 2016-06-20 09:24:23 +02:00
Bartlomiej Grzeskowiak a5cfa2b12c - #7522 and #7428 revisited. ((a&7)>7U) is always false and ((X|7)>=6) is correct (X can be negative). 2016-06-17 12:12:53 +02:00
Daniel Marjamäki d1f06ff47c Fixed #7175 (False positive performance warning (buffer overwritten before its old content has been used)) 2016-06-13 15:46:43 +02:00
PKEuS 53e2cabdbb Properly support "break" in CheckVaarg::va_list_usage() (#7533)
Ran AStyle
2016-06-07 19:28:32 +02:00
Simon Martin 3c10b25b3e Ticket #7117: Properly detect if a const ternary operator is in a template parameter list. 2016-06-05 14:13:32 +02:00
Robert Reif 583b340034 enum: set the return type of derived class functions returning enums defined in a base class. 2016-06-05 14:08:33 +02:00
Simon Martin 3095f47a7b Ticket #7137: Properly detect C++14 digit separators. (#802)
Add an optional extended description…
2016-06-04 22:55:55 +02:00
PKEuS 3916cd628e windows.cfg: Fixed configuration of _tfopen_s/_wfopen_s ( 2016-06-02 09:41:01 +02:00
PKEuS 9a61559eca Fixed false positive va_list_usedBeforeStarted (#7527) 2016-06-02 09:32:45 +02:00
Daniel Marjamäki c24a4b9189 Removed enum mismatch checker. Ticket #6960. 2016-05-29 18:00:37 +02:00
Robert Reif f4dd43a71a Fixed #7523 (Scope::findEnumerator(): does not find enum constant from other enum type) 2016-05-29 14:45:45 +02:00
Simon Martin 12a298b9cd Ticket #7445: Properly represent integer types smaller than int in CheckIO::ArgumentInfo. 2016-05-28 15:36:13 +02:00
Daniel Marjamäki 2b2f12bcd5 Fixed #6758 (Preprocessor: handle #__VA_ARGS__) 2016-05-28 11:27:45 +02:00
Daniel Marjamäki cee67730b1 Fixed #5746 (Cppcheck returns error-exitcode when globally suppressed error is encounted when running with multiple jobs.) 2016-05-27 20:13:51 +02:00
PKEuS 00e4f70fe3 Fixed false positives in CheckSizeof::checkSizeofForPointerSize() (#7518) 2016-05-26 21:25:29 +02:00
PKEuS 373ac52480 Mention exact function name in invalidscanf message (#5649) 2016-05-26 21:11:33 +02:00
Daniel Marjamäki 4b903a838f Fixed #5522 (CheckLeakAutoVar: Don't treat 'x==p' as dereference of p) 2016-05-26 19:22:38 +02:00
Daniel Marjamäki be755af762 Removed todo testcase for #5783 2016-05-26 18:47:36 +02:00
Daniel Marjamäki 2a42f245a9 Fixed #7130 (Wrong assignmentInAssert when using lambda in predicate function) 2016-05-26 18:29:29 +02:00
Daniel Marjamäki 54be403f64 Fixed #7026 (Cppcheck does not recognizes the use of a variabile inside lambda function) 2016-05-26 18:07:56 +02:00
Daniel Marjamäki 38741868b5 Fixed #3989 (false positive: memory leak (inline function)) 2016-05-26 17:42:27 +02:00
Robert Reif 66cacde3db Fixed #7513 (value flow of array dimension with enum doesn't always work) 2016-05-26 11:25:50 +02:00
Daniel Marjamäki 50352c8d69 Fixed #3552 (Don't warn about missing ctor for class inside union) 2016-05-25 19:05:16 +02:00
PKEuS c7b3836379 Small refactorizations:
- Optimized performance of several functions by adding pre-checks
- Simplified some code
- Fixed VS warning in testsymboldatabase.cpp
2016-05-25 15:30:49 +02:00
PKEuS 8c0eab3eb3 Optimization: Improved performance of CheckBufferOverrun::checkScope() when dealing with a large number of arrays (#5975)
-> checking time decreases from 1010s to 50s on the code snippet in #5975
-> Dropped a garbage code unit test
2016-05-25 14:42:00 +02:00
Daniel Marjamäki ae97f53244 Fixed #6184 (ValueType: overloaded < operator) 2016-05-25 13:56:36 +02:00
Matthias Krüger 0556edd151 fix #7505 (crash on invalid code) 2016-05-25 13:14:34 +02:00
PKEuS f2ae295f1e Support char literals in CheckCondition::checkIncorrectLogicOperator() (#5912) 2016-05-24 15:08:48 +02:00
Daniel Marjamäki 06a594a9e0 Fixed #6207 ('not' misinterpreted as alternative C token) 2016-05-24 13:33:21 +02:00
Daniel Marjamäki 397480f929 Fixed #7376 (ValueType: wrong type for container element) 2016-05-23 18:53:59 +02:00
Daniel Marjamäki 37afc57a2a Fixed #7455 (Suppressions: not working well with windows path separators) 2016-05-23 15:38:47 +02:00
PKEuS 4bb99a7887 Improved CheckSizeof::checkSizeofForPointerSize():
- Support cast in front of malloc() call
- Support sizeof(type) pattern (#4428)
2016-05-22 22:29:52 +02:00
Daniel Marjamäki 710e066a9a Fixed #6406 (VarId: struct member initialization) 2016-05-22 21:18:52 +02:00
PKEuS 64d2fd2f57 Added new attribute "arg" to <alloc> and <dealloc> to specify the argument that is allocated/deallocated.
This fixes several issues with allocation functions in windows.cfg, such as HeapAlloc() and VirtualAllocEx() (#7503)
2016-05-22 17:19:14 +02:00
PKEuS 851c6e0ed5 Improved buffer overflow checking for scanf: %c with a width (#3494) 2016-05-22 14:00:26 +02:00
Daniel Marjamäki 06d5e73e88 Fixed #7471 (Tokenizer::prepareTernaryOpForAST: typedef with comma inside ?:) 2016-05-22 11:33:21 +02:00
Daniel Marjamäki b7b92b2140 Fixed #6674 (false positive 'unusedPrivateFunction' - calling virtual function in subclass) 2016-05-21 20:07:35 +02:00
Daniel Marjamäki c23c1f245c Fixed #6989 (incorrect memleak error) 2016-05-21 14:03:28 +02:00
Alexander Mai d492500f34 #5844 False positive: returnReference fp for inner lambda function 2016-05-20 23:46:56 +02:00
orbitcowboy b1b0c920e3 Removed sprintf_s from windows.cfg. 2016-05-19 08:22:40 +02:00
orbitcowboy 46adf180d7 cfg: Added support for fopen_s and sprintf_s functions. Fixed a wrong tests. 2016-05-18 09:31:26 +02:00
Alexander Mai 303a85a930 #4195 segmentation fault of cppcheck (invalid code). Fix segfault which turned up after refactoring the enum handling code. 2016-05-17 22:19:23 +02:00
Alexander Mai 4f77a2b044 #7500 buffer overflow: encodeMultiChar lib/mathlib.cpp:343. Improve errors handling 2016-05-17 20:43:32 +02:00
Daniel Marjamäki 7453b641bd Fixed #4839 (Variable (in array) is assigned a value that is never used) 2016-05-17 16:03:55 +02:00
Daniel Marjamäki 99fc13ee70 Fixed #6968 (unusedPrivateFunction not correct, called by inner class) 2016-05-16 20:52:50 +02:00
Daniel Marjamäki 65998f1d7c CheckClass: previous change introduced false positives when Token::function() is wrong. Avoid those false positives. 2016-05-16 10:55:22 +02:00