Commit Graph

2614 Commits

Author SHA1 Message Date
Daniel Marjamäki ef30da51bf Fixed #3034 (Cppcheck crash on specific file (truecrypt).) 2011-08-29 19:16:52 +02:00
Robert Reif 7775934492 really fix multi-dimensional arrays with undefined size 2011-08-28 13:32:42 -04:00
Daniel Marjamäki 787bc4c384 Fixed #3016 (Preprocessor has incorrect precedence(?) for &&) 2011-08-28 18:30:58 +02:00
Robert Reif cf6d04de74 fix #3044 (Symbol database: handle multidim array with unknown dimension 'char a[][4]') 2011-08-28 11:40:55 -04:00
Robert Reif 2d952c65e4 fix #3051 (False positive: operator= should return reference (when function takes pointer argument)) 2011-08-28 11:14:15 -04:00
Robert Reif 9a0d076295 fix #3052 (False Positive - Technically the member function 'Example::Clear' can be const.) 2011-08-28 09:21:00 -04:00
Robert Reif d643397a7e better message for strncpy zero-terminated check 2011-08-28 09:06:51 -04:00
Daniel Marjamäki a1aa66f370 Fixed #3039 (False Positive: Memory Leak 'p = pop(p);') 2011-08-28 11:28:14 +02:00
Robert Reif 8c093d0f8a refactor CheckBufferOverrun::checkScope strncpy check and change experimental to inconclusive 2011-08-27 21:18:39 -04:00
Daniel Marjamäki 15e965b530 Fixed #3038 (False Positive - memory leak (struct member passed to subfunction)) 2011-08-26 19:26:21 +02:00
Robert Reif 9539d22a1a partial fix for #3050 (strncpy zero termination check behaving flaky) 2011-08-25 23:48:32 -04:00
Robert Reif 1d7ab77251 fix #3043 (False Positive - Member variable 'ProgramRecPriorityInfo::profile' is not assigned a value in 'ProgramRecPriorityInfo::operator=') 2011-08-25 23:27:10 -04:00
Robert Reif 423a1ff64e add support for simplifying Qt emit in tokenizer 2011-08-25 20:54:35 -04:00
Robert Reif dfe89f395a fix #3049 (False Positive - Technically the member function 'VideoOutputNull::SetupDeinterlace' can be const.) 2011-08-25 19:13:53 -04:00
Daniel Marjamäki 6d9463139d Fixed #3038 (False Positive - memory leak) 2011-08-25 19:59:44 +02:00
Robert Reif 6e78b51071 make all functions that call reportError names in checkbufferoverrun end in Error for consisentcy 2011-08-24 07:11:39 -04:00
Robert Reif 6f3131da8c fix a serious symbol database bug where parts of a function could be skipped 2011-08-23 20:12:29 -04:00
Daniel Marjamäki 2f0fc9444f Fixed #3041 (false positive reported for error with id='deallocuse') 2011-08-23 23:18:47 +02:00
Robert Reif c7cb38b0b5 fix #3040 (False positive - Technically the member function 'PSIPTable::SetSection' can be const.) 2011-08-22 20:34:00 -04:00
Kimmo Varis abf29fc531 Add doxygen grouping for the new file. 2011-08-22 20:46:53 +03:00
Kimmo Varis 71778095c6 Compile fix. 2011-08-22 20:21:25 +03:00
Kimmo Varis 716679ec7d Move Suppressions class to own source files.
I want to use Suppressions class also in GUI. And that is easier
to do when it is not internal class of Settings class. And in
general is it more natural that Settings class only contains list
of suppressions and implementation is separate.
2011-08-22 19:57:28 +03:00
Robert Reif 8c1efe9bb6 improve message for #3035 (false negative: strcpy(dst, src) where src is bigger than dst) 2011-08-21 15:18:41 -04:00
Robert Reif 67e8731a96 partial fix for #3035 (false negative: strcpy(dst, src) where src is bigger than dst) 2011-08-21 14:44:55 -04:00
Daniel Marjamäki 7afec3cf6d Fixed #3032 (False positive: possible null pointer dereference (assignment in condition)) 2011-08-21 17:49:00 +02:00
Robert Reif 7eb43bc107 partial fix for #3030 (Improve check: Returning pointer to local array variable with '&' pointer operator) 2011-08-20 15:08:30 -04:00
Daniel Marjamäki d5bf5b7ad2 Preprocessor: allow that 'missingInclude' messages are suppressed with '--suppress=missingInclude' 2011-08-20 11:23:59 +02:00
Daniel Marjamäki 939504af3c Cppcheck: allow that 'toomanyconfigs' are suppressed. show these messages by default even though 'information' hasn't been enabled. 2011-08-20 11:20:25 +02:00
Daniel Marjamäki 27b29e5b8e Fixed #3023 (False positive: no possible null pointer dereference here: 'WARN_ON(!abc || abc->x == 0);') 2011-08-20 09:47:55 +02:00
Daniel Marjamäki dd09b24208 Fixed #3024 (False positive: memory leak for 'rc.bitmap' when rc is added to linux kernel list) 2011-08-20 09:17:34 +02:00
Daniel Marjamäki fe78e28d70 Cppcheck: Don't show information messages about interrupted checking unless --enable=information has been given. 2011-08-19 22:32:57 +02:00
Kimmo Varis 80ba3d6a92 Merge pull request #32 from rpavlik/qmake-configure-rules
Qmake configure rules
2011-08-19 13:00:34 -07:00
Robert Reif 2dd93dff75 move unused variable checks from checkother to checkunusedvar 2011-08-19 14:35:25 -04:00
Robert Reif 9fbef3ca7b fix #3011 (new check: when first comparison is true, the 2nd comparison is always true) 2011-08-19 13:28:37 -04:00
Daniel Marjamäki a735790e77 using boolean result in bitwise operation. fix false positive for '.. != (char *) &x' 2011-08-19 18:55:20 +02:00
Daniel Marjamäki 2dd1e290eb fixed false positives for the 'bitwise operator / comparison operator' check 2011-08-19 18:06:28 +02:00
Robert Reif eda9ff6fc5 refactor checkother to move error messages to follow check and rename some error functions to end in Error 2011-08-19 11:53:43 -04:00
Daniel Marjamäki 314d5f1e79 fixed false positive for 'using bitwise operation on boolean result' 2011-08-19 17:07:26 +02:00
Daniel Marjamäki 72b01d1ca0 Improve check: Tweaked the assignAndCompare to handle | also in addition to & 2011-08-19 16:10:09 +02:00
Daniel Marjamäki c107fdd2d4 Fixed #3018 (false positive: (style) Suspicious condition (assignment+comparison), it can be clarified with parentheses) 2011-08-19 13:54:06 +02:00
Daniel Marjamäki 40b493e621 Improve check: Clarify condition (using boolean result in bitwise operation) 2011-08-19 13:40:54 +02:00
Daniel Marjamäki 0d7c80ef21 improved comment of previous commit 2011-08-19 07:28:15 +02:00
Daniel Marjamäki 4606251ce8 Fixed #3001 (False Positive: Redundant assignment to itself) 2011-08-19 07:23:11 +02:00
Daniel Marjamäki e5ff920ea9 Suspicious condition: Better handling when rhs is non-numeric 2011-08-19 00:56:15 +02:00
Daniel Marjamäki a7728fef48 New check: warn about such suspicious conditions: '(a & b == c)' 2011-08-19 00:15:20 +02:00
Ryan Pavlik 50b0e95314 put the rules logic in its own .pri file, and allow easier override 2011-08-18 15:42:19 -05:00
Ryan Pavlik 33b5970c91 use the qmake config setting HAVE_RULES to enable/disable pcre rules support,
defaulting to on except on Windows.
2011-08-18 12:13:21 -05:00
Daniel Marjamäki afed93d7d6 Command line: Added --std option. Right now only --std=posix is possible but other options might be added later. 2011-08-17 20:08:55 +02:00
Robert Reif 88019658b4 fix #3013 (segmentation fault of cppcheck ( struct x : virtual y )) 2011-08-16 19:16:58 -04:00
Reijo Tomperi dd666b7c1b Add command line option: --debug-fp ... If used, cppcheck will print out the code generating error into output stream.
This is ment to be used for debugging false positive errors in Cppcheck.
Current implementation tries two alternatives. Without all headers or with all headers and prints out the option with
less code. In future versions this could try with individual headers or group of header files.
2011-08-16 22:58:27 +03:00