Commit Graph

6546 Commits

Author SHA1 Message Date
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
Edoardo Prezioso f62d1d0122 Fixed #3017 (set HAVE_RULES to yes only if HAVE_RULES is undefined when executing make.) 2011-08-19 00:28:31 +02:00
Daniel Marjamäki a7728fef48 New check: warn about such suspicious conditions: '(a & b == c)' 2011-08-19 00:15:20 +02:00
Daniel Marjamäki 8bc7b5c5b9 cmdlineparser: removed BOM 2011-08-18 23:46:31 +02:00
Kimmo Varis 771ce85492 Merge pull request #33 from rpavlik/handle-msvc-qt-cmdline
Detect msvc qt command prompt in build.bat
2011-08-18 14:34:36 -07:00
Ryan Pavlik 089a549f9d Detect msvc qt command prompt in build.bat 2011-08-18 16:24:36 -05:00
Daniel Marjamaki 232007b3c0 --std=posix : simplified help text. might still need further updates 2011-08-17 22:19:19 +02: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
Tim Gerundt aecf9fadcd Web: Update download to version 1.50 2011-08-17 18:30:05 +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
Daniel Marjamäki 5f25f2c6e6 Fixed #3012 (False Pos Memory Leak with a Macro) 2011-08-16 20:39:17 +02:00
Daniel Marjamäki 4f962acf16 Fixed #3009 (Using numeric constants in kernel space code) 2011-08-16 20:16:33 +02:00
Robert Reif a6c5eff1be fix #3006 (segmentation fault of cppcheck ( x < () < )) 2011-08-15 07:19:49 -04:00
Robert Reif 4168d79b09 fix #3005 (segmentation fault of cppcheck ( enum : x )) 2011-08-15 07:07:12 -04:00
Robert Reif 5364b4f7fb fix #3007 (false positive: (style) Struct 'Fred' hides typedef with same name) 2011-08-15 06:56:15 -04:00
Robert Reif ed507b73ee fix #3004 (false positive: (style) Struct 'Fred' hides typedef with same name) 2011-08-14 21:00:05 -04:00
Robert Reif 08e9d64a86 fix #3003 (segmentation fault of cppcheck (typedef a x[]; y = x )) 2011-08-14 20:38:16 -04:00
Robert Reif b7f42535ec fix #3000 (false positive: (style) Struct 'Fred' hides typedef with same name) 2011-08-14 18:50:33 -04:00
Robert Reif 389ab80b63 fix #2999 (false positive: (style) Struct 'Fred' hides typedef with same name) 2011-08-14 18:06:05 -04:00
Daniel Marjamäki d336e91049 Makefile: Added the -D_GLIBCXX_DEBUG flag again to get checked stl during debug 2011-08-14 18:57:48 +02:00
Daniel Marjamäki 961b6e7752 Preprocessor: Added safety checks in case the code is corrupt. Related to ticket #2998 2011-08-14 18:35:34 +02:00
Robert Reif da9bf37918 refactor CheckNullPointer::nullPointerByDeRefAndChec() to pull variable type lookup out of loop 2011-08-14 10:53:09 -04:00
Robert Reif 9a70ec87a8 convert CheckStl::if_find() to use the symbol database 2011-08-14 10:46:35 -04:00
Robert Reif ad45ba718c convert CheckOther::checkCharVariable() to use symbol database 2011-08-14 10:39:45 -04:00
Robert Reif cd2c0fd9c8 convert CheckOther::checkSizeofForNumericParameter() to use the symbol database 2011-08-14 10:21:07 -04:00
Robert Reif 741eabba16 convert CheckOther::checkIncrementBoolean() to use the symbol database 2011-08-14 10:16:39 -04:00
Daniel Marjamäki c2b32bcfe5 Makefile: Set debug mode 2011-08-14 10:46:56 +02:00
Daniel Marjamäki 01b9c0707d Settings: Removed the --enable=posix option. Ticket: #2949 2011-08-14 09:45:53 +02:00
Daniel Marjamäki 315112314c 1.50: Updated Makefile 2011-08-14 08:13:02 +02:00
Daniel Marjamäki a0a493d584 1.50: Updated Changelog 2011-08-14 08:11:42 +02:00
Daniel Marjamäki 3a260822ad 1.50: Updated version 2011-08-14 08:08:37 +02:00
Robert Reif 136c617a99 fix [tokenize.cpp:6353]: (style) Checking if unsigned variable 'indentlevel' is less than zero. 2011-08-13 12:47:16 -04:00
Kimmo Varis 51102ee076 GUITESTS: Replace benchmark data file.
The benchmark data file had errors when checking with Cppcheck.
And people reported these errors. So replace the file with one
that has no (currently found) errors.
2011-08-12 14:40:14 +03:00
Kimmo Varis a961c7e9fb GUI: Exclude test file from project file.
The 'test/test.cxx' is a test file that contains some errors for
testing purposes. Exclude it from the GUI-project file used to
check Cppcheck sources so people don't report errors from it.
2011-08-12 14:35:04 +03:00
Robert Reif b7f963f701 removed redundant set isNumber flag from previous commit 2011-08-12 07:15:10 -04:00
Robert Reif ce00d0d35e fix #2963 (FP: Typedef names considered duplicate because __LINE__ not expanded) 2011-08-11 18:18:47 -04:00
Robert Reif f7b9d4d726 fix #2991 (segmentation fault of cppcheck ( ::y(){x} )) 2011-08-11 17:57:54 -04:00
Kimmo Varis 2ef4e6fb59 GUITESTS: Remove the running script.
The script is available in another repository. I don't want to
distribute it with Cppcheck sources for now. Maybe if and when
there is more interest towards GUI tests...
2011-08-12 00:13:29 +03:00
Kimmo Varis d698e24746 dmake: Fix build in Windows. 2011-08-11 23:41:35 +03:00