Commit Graph

370 Commits

Author SHA1 Message Date
Greg Hewgill 8c245cfd2f switchCaseFallThrough is now a coding style check (ticket #2623) 2011-03-06 09:43:27 +13:00
Greg Hewgill 70fcbe94f4 avoid warning on first case (in case there are declarations before first case) 2011-03-05 00:45:58 +13:00
Greg Hewgill 8c1d7ef316 avoid crash when else condition doesn't have braces to link 2011-03-05 00:45:58 +13:00
Greg Hewgill ad45737805 more gracefully handle unexpected blocks inside switch 2011-03-05 00:45:57 +13:00
Greg Hewgill a532a9690e full implementation of switch case fall through 2011-03-05 00:45:57 +13:00
Greg Hewgill 93ea774484 initial simplistic implementation of switchCaseFallThrough 2011-03-05 00:45:57 +13:00
Zachary Blair e1b2569b81 Fixed #432 (New check: wrong usage of ! operator in conditions) 2011-02-27 12:30:22 -08:00
Daniel Marjamäki 85b1ea21cf Fixed #2590 (segmentation fault of cppcheck ( {}int )) 2011-02-19 09:56:17 +01:00
Daniel Marjamäki dfba4b7332 Fixed #2585 (segmentation fault of cppcheck (CheckOther::clarifyCalculation)) 2011-02-17 21:30:59 +01:00
Daniel Marjamäki 2657d36d03 Fixed #2502 (False positive: redundant assingment of object to itself) 2011-02-12 14:27:07 +01:00
Sébastien Debrard f5ed52b84b fix #2569 check postfix increment on boolean 2011-02-11 23:38:23 +01:00
Daniel Marjamäki 5175e4ff3f Fixed #2535 (false positive: (style) Variable 'A' is not assigned a value) 2011-02-09 19:20:44 +01:00
Erik Lax aeae5a867d Fixed #2550 (Bad substr/strncmp comparison) 2011-02-08 19:49:29 +01:00
Daniel Marjamäki 5640845a17 Fixed #2498 (False positive: redundant assignment) 2011-02-04 21:08:42 +01:00
Kimmo Varis 7d73b523be Clarify few verbose messages.
Dan pointed out to me earlier that he wants both short- and
verbose messages to be independently understandable. So modifying
some verbose messages to be easier to understand without the short
message.
2011-02-04 11:10:24 +02:00
Raphael Geissert f8e2d50e6f Use Token::simpleMatch where no special patterns are needed 2011-02-02 13:27:02 -06:00
Raphael Geissert 8d5863133c Use Token::simpleMatch where no patterns are used 2011-02-02 13:27:01 -06:00
Raphael Geissert cf2b6f7bc1 Remove useless spacing at the end of *Match strings 2011-02-02 13:27:01 -06:00
Raphael Geissert d592250284 Fix sizeof sizeof check to handle sizeof(sizeof type) 2011-02-02 11:49:32 -06:00
Daniel Marjamäki defeded4b5 Fixed #2529 (False positive: array 'req[3]' index 4 out of bounds) 2011-02-01 21:46:07 +01:00
Sébastien Debrard 078c36921d runastyle 2011-01-26 20:10:56 +01:00
Sébastien Debrard 3e7f29d6f9 fix #2510 Improve check 'sizeof for array given as function argument' 2011-01-26 20:08:06 +01:00
Sébastien Debrard 5d661d25a8 typo: message 2011-01-26 09:35:11 +01:00
Sébastien Debrard e82c190429 Merge branch 'master' of https://github.com/danmar/cppcheck
Conflicts:
	test/testother.cpp
2011-01-25 10:05:03 +01:00
Sébastien Debrard 4cf56dac2b Fix 2495 incorrect sizeof error message 2011-01-25 09:57:58 +01:00
Daniel Marjamäki a596a7a8fe Fixed #2494 (New check: clarify calculation when using ?: operator) 2011-01-24 21:40:49 +01:00
Sébastien Debrard c7b8bd543f fix ticket 155 - char array 2011-01-24 19:04:56 +01:00
Debrard Sébastien 27dce075e0 Fixed #155 (check size of a variable whose type is a sized array) 2011-01-22 19:21:56 +01:00
Robert Reif d73709a620 Symbol database: rename variables. ticket: #2468 2011-01-21 07:42:41 +01:00
Daniel Marjamäki ecac93ebed Fixed #2462 (false positive: (warning) Redundant code: Found a statement that begins with numeric constant) 2011-01-19 18:37:33 +01:00
Daniel Marjamäki 965c1a94fd Fixed #2475 (False positive in structure initialisation: The scope of the variable bits can be reduced) 2011-01-17 20:51:15 +01:00
Robert Reif 959e10cee5 Symbol database: renamed classes. ticket: #2468 2011-01-17 18:29:19 +01:00
Robert Reif bf9528558e Symbol database: pulled out classes into global scope. ticket: #2468 2011-01-17 07:21:59 +01:00
Zachary Blair 481907ef14 Fixed #2457 (CheckOther::checkIncorrectLogicOperator: hang if variable id is 0) 2011-01-16 13:57:29 -08:00
Daniel Marjamäki 93d1313186 Refactoring: Check if type is class/struct through symbol database 2011-01-16 19:57:29 +01:00
Daniel Marjamäki e6a1efa13b Fixed #2302 (Duplicate id 'unusedVariable') 2011-01-16 18:45:05 +01:00
Robert Reif d341b42b0c Symbol database: increased constness. ticket: #2468 2011-01-16 18:13:54 +01:00
Daniel Marjamäki bb2862bc97 fixed unit test 2011-01-15 21:04:20 +01:00
Daniel Marjamäki 94ebb24d3d Optimising: about 5% improvement with Visual Studio executable 2011-01-15 20:55:51 +01:00
Daniel Marjamäki 36c1807228 Fixed #2458 (false positive: (warning) Redundant code: Found a statement that begins with numeric constant) 2011-01-13 20:12:57 +01:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Daniel Marjamäki d758929490 Fixed #2433 (strtol: false positive when strtol isn't used in function call) 2011-01-08 09:23:51 +01:00
Daniel Marjamäki 37b1f7c296 memsetZeroBytes: improved error message. ticket: #2421 2011-01-06 16:27:22 +01:00
Raphael Geissert 6ec4497919 [PATCH] Check for calls to memset() where 0 bytes are to be filled
Inspired by Silvio Cesare's work
2011-01-06 11:31:58 +01:00
Daniel Marjamäki 033e759c39 command line: added 'information' id to enable 2011-01-05 21:20:21 +01:00
Zachary Blair 68700b3561 Fixed #2382 (Catching exceptions by value instead of reference) 2010-12-31 12:48:24 -08:00
Zachary Blair d11b5163b7 Fixed #2382 (Catching exceptions by value instead of reference) 2010-12-31 03:01:38 -08:00
Daniel Marjamäki fd27be2440 Fixed #2372 (internal error in logicaloperator check (varid=0)) 2010-12-29 10:07:28 +01:00
Kimmo Varis e8b81f909d Change 'Scope of variable'-message to information message. 2010-12-27 16:48:03 +02:00
Daniel Marjamäki 660de98c0c Fixed #2365 (Internal error: Token::Match called with varid 0) 2010-12-27 14:06:32 +01:00