Commit Graph

6835 Commits

Author SHA1 Message Date
Alexander Mai 96891dface #6276 clang: -fsanitize=integer warnings. Fix remaining issues in preprocessor.cpp. 2015-05-09 19:26:31 +02:00
PKEuS 22fbc18fb7 Fixed false positive for *a++ in for-loop condition
Moved unit test to testgarbage.cpp
2015-05-07 20:34:57 +02:00
Alexander Mai 1c5e9e47c5 #6671 false positive: incorrect sizeofwithsilentarraypointer with reference to array. 2015-05-06 07:38:26 +02:00
Alexander Mai 6f96634759 #6276 clang: -fsanitize=integer warnings. Fix unwanted integer overflow in TemplateSimplifier::useDefaultArgumentValues() and Tokenizer::simplifyQtSignalsSlots() 2015-05-03 15:21:58 +02:00
Daniel Marjamäki 71cb8e9f64 Fixed --errorlist output for new checker stringLiteralWrite 2015-05-03 15:02:34 +02:00
Daniel Marjamäki baa1ae079d New check: negative size in array declaration. Ticket #1760 2015-05-03 15:00:47 +02:00
Daniel Marjamäki e837bad01d Fixed false positive in new stringLiteralWrite checker 2015-05-03 12:34:27 +02:00
Matthias Krüger 6b80e61934 fix internal warning; was
[lib/checkstring.cpp:43]: (warning) Found simple pattern inside Token::Match() call: "] ="
2015-05-03 10:59:58 +02:00
Daniel Marjamäki 666377da1c Updated error message for stringLiteralWrite 2015-05-03 10:48:28 +02:00
Daniel Marjamäki 9d31afb663 Fixed #1748 (Undefined Behavior: Modification of string literal) 2015-05-03 10:44:40 +02:00
PKEuS 70a1e11ada Set version to 1.69.99/1.70 dev 2015-05-03 08:15:13 +02:00
Daniel Marjamäki ca1f19b6d4 Fixed #6378 (valueFlowForward: decrement not handled) 2015-05-02 17:30:09 +02:00
Daniel Marjamäki aab1d83075 Updated error message. write variable name. 2015-05-02 16:55:17 +02:00
PKEuS 4cbbd44d49 Fixed false positive #6663: Better support for loops in CheckStl::readingEmptyStlContainer() 2015-05-02 14:09:48 +02:00
Daniel Marjamäki dc54676289 Reverted my changes I made by mistake in previous commit 2015-05-02 14:01:31 +02:00
Daniel Marjamäki 28985d1baa manual: Document the cwe attribute 2015-05-02 11:43:42 +02:00
Daniel Marjamäki a79791cb81 1.69: Set versions 2015-05-01 18:51:33 +02:00
Frank Zingsheim 9bea7bec92 Fixed #6659 (heap user after free: kernel: sm750_accel.c) 2015-05-01 18:28:00 +02:00
Frank Zingsheim 4ceed51bfb Fixed #6607 (Crash triggered by TemplateSimplifier::useDefaultArgumentValues) 2015-05-01 17:13:02 +02:00
Alexander Mai fa42f554a8 cppcheck compilation fails with g++4.6.3 (#5929). Patch supplied by mavik1 2015-05-01 16:25:27 +02:00
orbitcowboy 785df82513 #6660: Fixed crash in Tokenize::SetVarid(). 2015-04-29 09:18:54 +02:00
Daniel Marjamäki 88f59ad7e8 Partial fix for #6656 (Allow that CWE is mapped for error message) 2015-04-25 17:48:11 +02:00
Daniel Marjamäki ad6db2ba81 Reverted 105de8e917, new checker had FPs that need to be fixed. 2015-04-25 15:35:31 +02:00
Daniel Marjamäki bdc024bd7c Fixed 6634 (false positive: dereferencing null pointer in a sizeof operation) 2015-04-20 13:46:02 +02:00
amai2012 8d8fffb20f #6651 Don't call member function on NULL pointer - even if call is "safe" 2015-04-17 08:47:59 +02:00
PKEuS ac867b4220 Handle pointers to const member functions in Tokenizer::simplifyFunctionPointers() (#6603) 2015-04-13 21:21:57 +02:00
PKEuS c4ceb97cea Fixed #6629: Don't simplify sinf(0) if sinf is a variable 2015-04-13 20:37:07 +02:00
PKEuS 708a379fd2 Refactorized simplification of sizeof without parantheses:
- Moved sizeofAddParentheses() behind combineOperators()
- Improved sizeofAddParentheses() to handle all code from unit tests at simplifyTokenList1()
- Removed simplification from simplifyTokenList2()
2015-04-13 20:18:21 +02:00
PKEuS 4c40664861 Fixed #6639: Calculate sizeof() of multidimensional arrays 2015-04-13 20:18:21 +02:00
PKEuS 19bba94282 Merge pull request #589 from simartin/restore_libcpp_build
Restore build with libc++ and revert PR#228 and PR#562.
2015-04-13 17:12:00 +02:00
PKEuS b6709294a8 Fixed ...... in template instantiations (similar to constconst from #6604) 2015-04-13 17:03:06 +02:00
Simon Martin e5745d7d4a Restore build with libc++ and revert PR#228 and PR#562. 2015-04-12 20:29:49 +02:00
PKEuS c2ccd7d9e4 Simplify _declspec like __declspec 2015-04-11 11:02:52 +02:00
Matthias Krüger 42f0955e3f Move more setting checks out of loops and use const bools instead. Reorder a few related checks.
Follow up to eedcb6abcb .
2015-04-10 14:31:19 +02:00
Frank Zingsheim 84830638a2 Improved fix #6636: (False positive unreadVariable - scope analysis seems to fail to False positive unreadVariable) 2015-04-09 21:09:31 +02:00
Robert Reif 4ceb24630d Fixed #6568: Scope for template class member function missing in symboldatabase 2015-04-09 21:01:47 +02:00
PKEuS d5ad1def40 Removed two unused functions 2015-04-09 20:54:07 +02:00
PKEuS 4e5c5eb238 Fixed #5665: Recognize free() with more than one parameter 2015-04-09 20:50:19 +02:00
Frank Zingsheim d52b031301 Fixed #6638: (varid for loop in for statement) 2015-04-09 19:58:12 +02:00
Frank Zingsheim 648ee95f31 Fixed #6636: (False positive unreadVariable - scope analysis seems to fail to False positive unreadVariable)
Bug was introduced by 1f5265c1bd
2015-04-08 20:30:41 +02:00
Daniel Marjamäki d563bd73f4 Fixed #6583 (False positive uninitvar - exit() ignored?!) 2015-04-08 15:35:04 +02:00
Gustav Palmqvist 105de8e917 #220 uninitialized variable: using variable in ctor before it has been initialized. Implement new check usageBeforeInitialization 2015-04-07 22:01:13 +02:00
orbitcowboy 8596794ce7 MathLib:mod: Declared local variable as const. No functional change. 2015-04-07 17:21:28 +02:00
Matthias Krüger eedcb6abcb move setting flags checks out of for loops, make them const. 2015-04-07 07:23:28 +02:00
Frank Zingsheim 1f5265c1bd Fixed #6253 ([False Positive] Variable not initialized in the constructor) 2015-04-06 19:47:21 +02:00
Alexander Mai 9876cf2312 #6626 crash: Token::astOperand2() const ( do while ). Fix two segmentation faults on invalid code. 2015-04-06 17:23:48 +02:00
Matthias Krüger 7fdbb91694 don't print warning message if --enable=warning is not specified.
message was of type:
(warning) Possible null pointer dereference: previous - otherwise it is redundant to check it against null.
2015-04-06 15:05:34 +02:00
Matthias Krüger 22d97fdbd6 don't print style message if --enable=style is not specified.
message was of type:
(style) Redundant checking of STL container element existence before removing it.
2015-04-06 14:26:15 +02:00
Matthias Krüger 988acf11b4 don't print warning message if --enable=warning is not given.
message was of type:
(warning) Passing value 0 to foo() leads to implementation-defined result.
2015-04-06 13:37:27 +02:00
Matthias Krüger 592177200a don't print warning message if --enable=warning is not given.
message was of type:
(warning) Call of pure virtual function 'foo' in constructor.
2015-04-06 13:34:44 +02:00