Commit Graph

649 Commits

Author SHA1 Message Date
Robert Reif 10eb224ac7 fix (segmentation fault of cppcheck) 2011-08-09 18:31:02 -04:00
Robert Reif 829611b129 fix (segmentation fault of cppcheck ( enum E {} e enum )) 2011-08-07 16:48:47 -04:00
Kimmo Varis cfcfa3f000 Use "enabled" list for the style checking.
Settings-class currently enables style checking via dedicated
boolean attribute. All other CLI's enable-options are handled
through the enable-list. This commit moves style-check enabling
to use the enable-list.

Main advantage is the consistency how options are handled/stored
in the Settings class. Which also unifies using them for the other
code. You need to enable certain type of checks? Use the
addEnabled()-method. You want to check if certain type of checks
are enabled? Use the isEnabled()-method.
2011-08-07 10:28:52 +03:00
Robert Reif d23fb873cc fix (Incorrect report: Class does not have a constructor) 2011-08-06 17:54:02 -04:00
Robert Reif fd01a7555a fix (segmentation fault of cppcheck ( enum x : )) 2011-08-05 18:07:18 -04:00
Daniel Marjamäki fb3870071a Fixed (crash of cppcheck while checking gcc-testsuite) 2011-07-21 16:13:35 +02:00
Daniel Marjamäki 9f22d2fc6b Fixed (out of bounds false positive, using reinterpret_cast) 2011-07-21 09:32:24 +02:00
Daniel Marjamäki 481be84004 TestSimplifyTokens: removed copy/pasted comment 2011-07-17 09:14:03 +02:00
Daniel Marjamäki 35938e74ad Tokenizer: better handling of 'struct AB ab; sizeof(ab)' 2011-07-16 22:07:30 +02:00
Daniel Marjamäki 5561d81f0d Tokenizer::simplifyGoto: fixed unit tests 2011-07-03 18:35:11 +02:00
Robert Reif b143b283e9 fix (crash of cppcheck ( typedef struct x { } )) 2011-07-03 10:50:15 -04:00
Robert Reif 8ec1dfacbf fix missing pop in Tokenizer::simplifyStructDecl() when anonymous struct/union removed 2011-07-03 08:14:51 -04:00
Robert Reif 3f4cc5fa3a add class A {} a; -> class A {}; A a; conversion capability to Tokenizer::simplifyStructDecl() 2011-07-02 09:21:30 -04:00
Reijo Tomperi 89fd5bacf9 Fix , False positive: memory leak (using question mark operator)
http://sourceforge.net/apps/trac/cppcheck/ticket/2849
Simplify: *d = b ? b : a; into if-else
Simplify { ; { ; } } into { ; }
Removed one memleak test which should be redundant now as question marks
should not get into memleak check.
2011-06-30 22:04:26 +03:00
Robert Reif 1713eeb532 fix (Extra qualification not detected) 2011-06-26 21:13:29 -04:00
Reijo Tomperi 918b4d859f Fixed , False positive: Returning value of strncat() reported as memory leak
http://sourceforge.net/apps/trac/cppcheck/ticket/2860
2011-06-26 23:53:16 +03:00
Robert Reif d80a55267c fix fix to generate correct output 2011-06-19 20:19:16 -04:00
Robert Reif 0bd26a73c4 fix (typedef causes 'syntax error') 2011-06-19 17:57:01 -04:00
Robert Reif eaf836b323 fix extra qualification check for same class name in different namespaces 2011-06-14 15:31:52 -04:00
Robert Reif d1b260699a fix (crash of cppcheck (std::vector<int>::iterator)) 2011-06-12 08:24:49 -04:00
Robert Reif 3d4eb0d77e fix (segmentation fault of cppcheck ( x a[0] = )) 2011-06-10 15:11:45 -04:00
Robert Reif 6635ed4630 fix (false positive: Function parameter 'STYLE' hides enumerator with same name) 2011-06-08 20:14:52 -04:00
Robert Reif 311651cc66 fix (Underlying type of enumerator produces a syntax error) 2011-05-27 11:17:39 -04:00
Robert Reif 51baca0359 fix (simplifyTypedef: scope info is lost) 2011-05-02 22:42:52 -04:00
Daniel Marjamäki bbd379c802 astyle formatting 2011-05-02 15:08:16 +02:00
Daniel Marjamaki 297ca63868 Fixed (Tokenizer::simplifyTemplates: fail when using template argument 'char[2]') 2011-05-01 19:05:18 +02:00
Robert Reif 3c415e7833 fix (Enum vs local variable - conflict) 2011-04-23 22:08:03 -04:00
Robert Reif 04309f74f5 fix (syntax error on valid code) 2011-04-20 19:09:28 -04:00
Robert Reif b1d3d291e6 fix (segmentation fault of cppcheck) 2011-04-20 07:49:04 -04:00
Robert Reif 877a233145 fix (Easy to reproduce crash) 2011-04-16 10:35:23 -04:00
Daniel Marjamäki 739b6a93e2 Fixed (False positive (Redundant assignment)) 2011-04-16 12:07:56 +02:00
Robert Reif 3159df958d fix (false positive: syntax error with c++0x code) 2011-04-14 19:50:17 -04:00
Robert Reif 75e5353b6d fix (Analysis failed. If the code is valid then please report this failure.) 2011-04-13 23:58:58 -04:00
Robert Reif 257197bdd1 fix (false positive: syntax error (typedef void f(int) const;)) 2011-04-13 23:24:41 -04:00
Robert Reif 50a1f28d86 run astyle 2011-04-13 21:12:35 -04:00
Daniel Marjamäki 11bd6bcd30 Fixed (false positive: Division by zero) 2011-04-10 21:27:09 +02:00
Daniel Marjamäki 447f61e9c7 Refactoring: Use %op% 2011-04-09 18:30:47 +02:00
Daniel Marjamäki f6d910ab3d Refactoring: Use Token::isOp 2011-04-09 15:54:36 +02:00
Daniel Marjamäki ea57e10c7f Tokenizer::simplifyCalculations: simplify division result if it's a whole number, even though it doesn't have precedence 2011-04-02 12:52:11 +02:00
Daniel Marjamäki f34e9e6623 Tokenizer: better simplification of calculations in conditions 2011-04-02 11:08:58 +02:00
Stefan Weil 675e63b6a7 Spell checks 2011-03-30 16:45:31 +02:00
Robert Reif fc258164cd fix (false positive: syntax error) 2011-03-24 22:26:42 -04:00
Robert Reif 7b63da4964 fix (Segmentation fault (typedef)) 2011-03-17 20:00:49 -04:00
Daniel Marjamäki dab09aedee Fixed (Tokenizer::simplifyTemplates: Segmentation fault (gcc-testsuite)) 2011-03-17 21:45:03 +01:00
Daniel Marjamäki fec9edf628 Tokenizer::simplifyTemplates: First simple fix for problems when using sizeof in template parameter 2011-03-16 22:16:30 +01:00
Robert Reif f7cbc90c84 fix (### Internal error in Cppcheck. Please report it.) 2011-03-15 23:28:45 -04:00
Robert Reif ba0b3e6451 fix function typedef with extra ()s 2011-03-15 19:24:30 -04:00
Robert Reif 7a7257f200 fix (segmentation fault of cppcheck ( typedef ... ) 2011-03-08 20:24:57 -05:00
Daniel Marjamäki 7496cd412c Fixed (Tokenizer::simplifyTemplates: template usage 'std::cout << (foo<double>(r));') 2011-03-07 21:21:06 +01:00
Robert Reif d678e4424c fix (segmentation fault of cppcheck ( typedef y x () x )) 2011-03-06 18:59:56 -05:00
Daniel Marjamäki f53ff27b71 Tokenizer::simplifyTemplates: better handling of '(foo<double>())'. Ticket: 2011-03-06 21:15:42 +01:00
Daniel Marjamäki 6648267ab8 Revert "Tokenizer::simplifyTemplates: better handling of '(foo<double>())'. Ticket: "
This reverts commit de31ec1e44.
2011-03-06 21:07:06 +01:00
Daniel Marjamäki de31ec1e44 Tokenizer::simplifyTemplates: better handling of '(foo<double>())'. Ticket: 2011-03-06 10:28:51 -08:00
Robert Reif 0debba4409 finish fixing (better function pointer support needed) 2011-03-05 21:41:58 -05:00
Robert Reif 7d2fb2ecde partial fix for (better function pointer support needed) 2011-03-05 20:48:28 -05:00
Robert Reif f3b2acf585 really fix reference of typedef of array not simplified properly 2011-03-03 20:32:10 -05:00
Robert Reif 3f0d0446e0 revert previous commit: simplified code isn't correct 2011-03-03 07:40:43 -05:00
Robert Reif ee4b4f62d8 fix reference of typedef of array not simplified properly 2011-03-03 07:27:53 -05:00
Robert Reif 26152a9264 fix (False positive on template dependent name) 2011-02-24 06:39:46 -05:00
Daniel Marjamäki daf0e7c37d Fixed (Segmentation fault of cppcheck ( sizeof <= A )) 2011-02-23 20:44:14 +01:00
Robert Reif d1f7a8aca4 fix (simplifyTypedef: array of function pointers) Internal error message 2011-02-22 22:11:17 -05:00
Robert Reif dd12fc177f fix (segmentation fault of cppcheck ( typedef constexpr)) 2011-02-22 07:48:34 -05:00
Robert Reif 703448171a fix (segmentation fault of cppcheck) 2011-02-22 07:02:15 -05:00
Robert Reif 4e1ce93104 fix (segmentation fault of cppcheck ( enum{const} )) 2011-02-21 19:30:40 -05:00
Robert Reif 999646fca6 fix (segmentation fault of cppcheck ( sizeof )) 2011-02-21 17:49:30 -05:00
Daniel Marjamäki 63c003f92e Tokenizer: fixed so that 'p=&x; if(p)' is simplified to 'p=&x;if(&x)'. Ticket: 2011-02-20 18:18:27 +01:00
Daniel Marjamäki 1cfb18be08 astyle formatting 2011-02-20 12:22:01 +01:00
Daniel Marjamäki 46f4e46d30 Tokenizer::simplifyTemplates: Better handling for multi-token template arguments such as 'Foo<std::string>' 2011-02-20 12:17:05 +01:00
Robert Reif 77fe9858e2 fix (Spurious warning about struct hiding typedef) 2011-02-19 14:18:37 -05:00
Daniel Marjamäki 0ed0d07714 Tokenizer::simplifyCalculations: basic handling of bitwise operators 2011-02-14 20:43:26 +01:00
Robert Reif cdd8d3f785 Really fix perl-tk 2011-02-13 19:02:57 -05:00
Robert Reif c03ace7378 Fix (segmentation fault of cppcheck) 2011-02-13 14:11:22 -05:00
Robert Reif 78b5361ec8 fix (False positive: (style) Union 'A_t' hides typedef with same name (forward declaration)) 2011-02-11 19:09:24 -05:00
Robert Reif 7502cea4d3 Fixed (simplifyTypedef: wrong simplification for sizeof(array)) 2011-02-08 19:47:14 -05:00
Robert Reif e9ec4bc3e4 Fixed (cppcheck hangs with 100% cpu load) 2011-02-03 07:58:49 +01:00
Robert Reif 8eb92001b3 Fixed (Tokenizer: Remove redundant 'MyClass::' inside MyClass class declaration) 2011-02-02 07:40:08 +01:00
Pete Johns 098f0bf3e6 Fixed (Make TODO_ASSERT_EQUALS take three arguments (value, to_be, as_is)?...
Removed replaced EXPECTED with...

WANTED (to-be):     The future expected value.
CURRENT (as-is):    Documenting how cppcheck behaves now.

This removes the need for an ASSERT_EQUALS but enforces the check for every TODO_ASSERT_EQUALS.
2011-01-30 23:20:11 +11:00
Daniel Marjamäki 524498e439 Tokenizer: collapse operator function names into a single token. ticket: 2011-01-27 18:44:20 +01:00
Daniel Marjamäki b10f0aabd6 Fixed (simplifyTypedef: upx-ucl) 2011-01-23 09:04:34 +01:00
Raphael Geissert da998fec68 Tokenizer: simplify restrict 2011-01-16 11:37:03 +01:00
Robert Reif beb2db82a2 Fixed (false negative: division by zero when using enum) 2011-01-16 11:24:58 +01:00
Daniel Marjamäki 5920dbb7e7 Fixed (Tokenizer: simplification of enum) 2011-01-15 08:21:06 +01:00
Robert Reif 8ecba0af90 Fixed (False positive: not initialised/not assigned Static variable in copy constructors.) 2011-01-15 08:04:50 +01:00
Robert Reif 708a75e363 Fixed (syntax error when 'void f(typedef int x)' is used. causes segmentation fault.) 2011-01-14 07:41:22 +01:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Robert Reif bfc95e01c1 Fixed (### Internal error in Cppcheck. Please report it.) 2011-01-07 08:02:47 +01:00
Robert Reif d7e170b3ca typedef: fixed problem. ticket: 2011-01-06 07:52:59 +01:00
Robert Reif 157498e694 Fixed (typedef: struct with inheritance) 2011-01-05 17:42:55 +01:00
Daniel Marjamäki d700f25518 Fixed (Tokenizer::simplifyKnownVariables: variables in conditions) 2011-01-04 21:35:35 +01:00
Daniel Marjamäki 2c6421d162 Merge branch 'master' of https://github.com/rgeissert/cppcheck into rgeissert-realloc 2011-01-04 18:21:18 +01:00
Robert Reif 63208e87d3 typedef: delete unhandled typedefs. ticket: 2011-01-04 07:43:40 +01:00
Robert Reif a782d3ddf7 typedef: fix testcase 4. ticket: 2011-01-04 07:39:41 +01:00
Raphael Geissert 3d9550b0bf Simplify "x = realloc (0, n);" to "x = malloc(n);" 2011-01-02 17:46:10 -06:00
Daniel Marjamäki d2714fefda typedef: Fixed testcase. ticket: 2011-01-02 17:28:47 +01:00
Daniel Marjamäki 320604f073 typedef: added more tests. ticket: 2011-01-02 07:42:47 +01:00
Daniel Marjamäki 307178d3c2 Tokenizer: Better handling of duplicate enums. Ticket: 2010-12-30 20:55:23 +01:00
Robert Reif 3900ac731e simplifyTypedef: Better handling of 'typedef int RexxFunctionHandler();'. Ticket: 2010-12-29 20:25:47 +01:00
Robert Reif 137d0e2ba7 typedef: fixed problem with 'typedef int pread_f(int);'. ticket: 2010-12-29 09:18:41 +01:00
Robert Reif e82b1f8946 typedef: fix typedef simplification. ticket: 2010-12-28 21:21:13 +01:00
Daniel Marjamäki 0667fcf53c Fixed (simplifyTypedef: wrong simplification of 'typedef FMAC1 void (*a)();') 2010-12-28 14:04:44 +01:00
Robert Reif 1b92eeae1e Fixed (simplifyTypedef: function pointers are not simplified into valid code) 2010-12-28 08:01:32 +01:00
Daniel Marjamäki 6f8f0e1aa1 Fixed (Tokenizer::simplifyKnownVariables: wrong simplification after return) 2010-12-25 10:07:57 +01:00
Daniel Marjamäki 18fd12006a Tokenizer::simplifyGoto: Don't simplify 'goto' inside unhandled macro calls. Ticket: 2010-12-23 22:03:58 +01:00
Daniel Marjamäki 472ecd8805 Tokenizer: Fixed calculation simplification of '0*(*p)'. Ticket: 2010-12-23 18:59:18 +01:00
Robert Reif fc7e2d1ac1 Fixed (false positive for function pointer returning typedef) 2010-12-22 18:37:23 +01:00
Daniel Marjamäki 41ac2c252f Fixed (Tokenizer: Remove for-loop if condition is false) 2010-12-18 21:43:12 +01:00
Robert Reif bf136f0123 Fixed (False positive: (style) Template instantiation 'Foo' hides typedef with same name) 2010-12-16 07:48:46 +01:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Daniel Marjamäki 69bacde479 Tokenizer: Cleanup redundant statement '; x = x + 0;'. Ticket: 2010-12-09 19:35:52 +01:00
Robert Reif f12c0c7ada Tokenizer: add assert(_settings) to Tokenizer to insure the tokenizer always has settings. Ticket: 2010-12-01 18:00:55 +01:00
Daniel Marjamäki add8584612 Fixed (segmentation fault of cppcheck) 2010-11-29 17:46:10 +01:00
Robert Reif 07f4067fa8 typedef: better handling of __typeof__ 2010-11-11 17:02:04 +01:00
Robert Reif a09c221014 typedefs: handle __typeof__ 2010-11-11 06:40:49 +01:00
Robert Reif 8a379d4826 Fixed (Tokenizer::simplifyTypedef function pointer bug) 2010-11-06 15:15:50 +01:00
Robert Reif c49a8a99a3 Fixed (Tokenizer::simplifyTypedef : wrong simplification of 'typedef float vec_t[3];') 2010-11-06 13:28:44 +01:00
Daniel Marjamäki c39fbb86db Tokenizer::simplifyKnownVariables : Fixed TODO test case when simplifying pointer alias in function call 2010-11-06 13:24:33 +01:00
Daniel Marjamäki e901ee2e68 Added TODO unit test for ticket . simplify 'typedef float x[3];' 2010-11-06 09:31:43 +01:00
Robert Reif 431201dd67 Fixed (Tokenizer::simplifyFunctionReturn bug) 2010-11-06 06:53:09 +01:00
Daniel Marjamäki 52faadda89 Tokenizer: simplify calculations with zero better 2010-11-05 20:35:31 +01:00
Daniel Marjamäki 4fdb420454 Tokenizer: simplifyknownvariables, improved handling of string constant 2010-11-05 20:05:57 +01:00
Daniel Marjamäki a38b14d582 Tokenizer: Remove redundant semi colons 2010-10-26 21:05:20 +02:00
Daniel Marjamäki 02ba2b202e Fixed (Tokenizer::simplifyTypedef: regression - wrong simplification of 'typedef char TString[256];') 2010-10-20 06:09:29 +02:00
Robert Reif 267d1f273e Fixed (Tokenizer::simplifyTypedef: wrong handling of array) 2010-10-13 20:02:37 +02:00
Daniel Marjamäki 2334192bff Fixed (False positive: Array 'str[1]' index 1 out of bounds) 2010-10-12 21:52:02 +02:00
Robert Reif 24eba7ef02 Unit Testing: Added more typedef tests 2010-10-08 16:00:21 +02:00
Daniel Marjamäki e4c3b390cc Fixed (cppcheck fails to scan OpenBSDs ftp source code) 2010-10-02 13:28:44 +02:00
Pete Johns 9a9302cba1 Prevent Tokenizer::simplifyCalculations() from removing parantheses from calls to Functors. 2010-10-02 21:19:05 +10:00
Robert Reif 2fc2859b68 Fixed (Enum 'qboolean' hides typedef with same name) 2010-09-08 06:45:57 +02:00
Daniel Marjamäki cfe694330f Fixed (Internal Error on multiple append calls on same string object) 2010-09-06 21:34:51 +02:00
Robert Reif fbffaade2e Fixed (Parser error in template function) 2010-09-02 19:09:06 +02:00
Daniel Marjamäki 7ec3c72a19 Fixed (operator new [] simplified wrong) 2010-08-30 21:06:22 +02:00
Robert Reif 0d530711f6 Fixed (segmentation fault of cppcheck with wrong syntax of -std=c++0x) 2010-08-30 07:25:17 +02:00
Daniel Marjamäki d45186d645 Added --debug-warnings that we can use to enable various debug warnings 2010-08-27 20:28:00 +02:00
Robert Reif 499a12c896 Tokenizer::simplifyTypedef: Report about unhandled typedefs. Ticket: 2010-08-26 20:44:13 +02:00
Daniel Marjamäki ca9cdf5bf5 Tokenizer: If syntax errors are found then don't return a token list. Ticket: 2010-08-25 22:10:21 +02:00
Robert Reif 4a6070d2af fix 2 problems related to ticket 1976:
1. nested unnamed anonymous structures and unions were not supported.
 2. declaration split up in class had bug if proceeded by access specifier.
2010-08-25 20:17:31 +02:00
Robert Reif d961a6ec9e Tokenizer: Fixed cppcheck and compiler warnings 2010-08-24 07:28:56 +02:00
Robert Reif 7173e01926 Fixed (tokenizer::simplifyEnum add support for C++0x enums) 2010-08-21 07:44:56 +02:00
Robert Reif f123e951ec Fixed (typedef array incorrectly simplified) 2010-08-20 07:11:02 +02:00
Daniel Marjamäki cfa7b4906e Symbol database: bug fixes. Ticket: 2010-08-18 22:42:04 +02:00
Daniel Marjamäki 2e2baa23a6 Fixed (### Internal error in Cppcheck. Please report it) 2010-07-28 21:03:15 +02:00
Daniel Marjamäki 7c5219324e Refactoring: Cleanup include that checkheaders reported as not needed 2010-07-26 22:05:51 +02:00
Daniel Marjamäki e1612bc175 Fixed (Internal error when enum assigned to sizeof without brackets) 2010-07-22 22:21:12 +02:00
Robert Reif c572e6af87 Fixed (False positive with -s: Variable hides typedef with same name) 2010-07-13 08:08:12 +02:00
Robert Reif b0f1d5669b Fixed (### Internal error in Cppcheck. Please report it.) 2010-07-07 07:40:11 +02:00
Robert Reif 1799e4a575 Fixed (### Internal error in Cppcheck. Please report it.) 2010-07-06 08:26:30 +02:00
Robert Reif c949a29d1e Fixed (simplifyTypedef: better typedef support) 2010-07-05 23:03:54 +02:00
Robert Reif 28c265b20c Fixed (simplifyTypedef: better typedef support) 2010-07-02 15:22:29 +02:00
Robert Reif b33fb48618 Fixed (Tokenizer: remove restrict keyword) 2010-06-30 08:10:39 +02:00
Daniel Marjamäki 46e2f1e64b --author=Robert Reif <reif@earthlink.net>
Fixed  (false positive: Variable hides typedef with same name)
2010-06-28 15:33:27 +02:00
Robert Reif ec61c6fa26 Fixed (simplifyTypedef: duplicate typedefs not handled properly) 2010-06-18 07:16:05 +02:00
Robert Reif f116e74f6e Fixed (Segmentation fault while scanning Qt's qcups.cpp) 2010-06-17 06:59:01 +02:00
Robert Reif 61e7e759f0 Fixed (structure templates) 2010-06-16 07:13:52 +02:00
Daniel Marjamäki f3fbdc96e1 Fixed (Tokenizer: template destructor is lost) 2010-06-12 08:32:05 +02:00
Robert Reif 6b65b77acf Fixed ((error) ### Internal error in Cppcheck. Please report it.) 2010-06-10 07:18:55 +02:00
Daniel Marjamäki 08b6e6ee09 Fixed (False positive: Resource leak with while) 2010-05-30 13:15:15 +02:00
Daniel Marjamäki 83c62eca9c Tokenizer: simplify loops that continue while errno is EINTR 2010-05-30 12:49:39 +02:00
Daniel Marjamäki 46b5e4e79a Fixed (Wrong reporting of leak with close() in a while loop condition) 2010-05-29 22:20:10 +02:00
Daniel Marjamäki d09e1df0d7 Fixed (Wrong precedence for shift operators when simplifying calculations?) 2010-05-29 20:27:08 +02:00
Robert Reif 1a25183e8f Fixed (simplifyTypedef: support for more typedefs) 2010-05-29 07:52:06 +02:00
Robert Reif 3fb0260ef1 Fixed (remove Microsoft variants of inline) 2010-05-29 07:43:58 +02:00
Robert Reif 26a7d29760 Fixed (simplifyTypedef: support for more typedefs) 2010-05-28 06:55:54 +02:00
Robert Reif 8881a0c361 Fixed (simplifyTypedef: support for more typedefs) 2010-05-27 07:00:33 +02:00
Robert Reif 019e1f9dfe Fixed (simplifyTypedef: support for more typedefs) 2010-05-25 20:43:44 +02:00
Daniel Marjamäki 78255fdfc5 Tokenizer: Removed the Tokenizer::simplifyNamespaces. Ticket: 2010-05-23 13:51:41 +02:00
Robert Reif b20cf06b66 Fixed (simplifyTypedef: support for more typedefs) 2010-05-23 10:46:39 +02:00
Robert Reif 41c43c1790 Fixed (False positive: Function parameter 'x' is passed by value. It could be passed by reference instead.) 2010-05-18 18:20:11 +02:00
Robert Reif 0d7474042a Fixed (segmentation fault of cppcheck) 2010-05-18 07:11:23 +02:00
Robert Reif 9dfbd3946a Fixed (Tokenizer::simplifyTypedef causes segfault for boost library) 2010-05-17 19:58:27 +02:00
Erik Lax 19aaa32a99 Fixed (Tokenizer::simplifyKnownVariables and pointer assignments) 2010-05-16 19:38:44 +02:00
Daniel Marjam�ki 8b1ffefd74 Fixed (Internal error) 2010-05-14 18:40:15 +02:00
Robert Reif f8cceface5 Fixed (False positive: (style) Variable 'xxx' is assigned a value that is never used) 2010-05-13 13:59:41 +02:00
Robert Reif 963108d957 Fixed (simplifyTypedef: support for more typedefs) 2010-05-11 21:41:33 +02:00
Robert Reif a390f3c8f4 Better handling of function pointer typedef 2010-05-10 17:50:40 +02:00
Robert Reif ac7515cdcc Fixed (simplifyTypedef: add support for typedefs of functions) 2010-05-10 07:12:06 +02:00
Daniel Marjamäki 6bb93b5eb7 Fixed (Tokenizer: improve handling of pointer aliasing) 2010-04-25 15:12:47 +02:00
Daniel Marjamäki 8ccd95a643 Fixed (buffer overrun: memmove) 2010-04-24 21:48:58 +02:00
Robert Reif 99a7755218 tokenizer improvements: remove calling convention () 2010-04-24 09:40:05 +02:00
Robert Reif f4ce5a37d7 Fixed (False positive - C-style pointer casting) 2010-04-22 20:08:29 +02:00
Robert Reif 90541386da Fixed (tokenizer: remove calling convention) 2010-04-21 21:08:47 +02:00
Robert Reif bee4608b27 Fixed (False -s positive: Template instantiation hides typedef with same name) 2010-04-18 09:13:55 +02:00
Daniel Marjamäki c0e9a546f7 Refactoring: Refactoring the Settings class 2010-04-17 09:23:54 +02:00
Daniel Marjamäki c718a7c595 astyle: Update to astyle 1.24 2010-04-15 20:08:51 +02:00
Daniel Marjamäki 3fa2137ee3 Fixed ('Index out of bounds' false positive) 2010-04-15 19:09:19 +02:00
Robert Reif d2bb4964d0 Fixed (typedef struct incorrectly simplified) 2010-04-14 19:06:51 +02:00
Reijo Tomperi 0912836c25 Fix: sizeof(char*) was not simplified correctly 2010-04-13 23:17:27 +03:00
Reijo Tomperi 4a33b226e6 Fix (false positive on if( (f = fopen("foo", "r")) == ((FILE*)NULL) ))
http://sourceforge.net/apps/trac/cppcheck/ticket/1599
2010-04-13 22:57:52 +03:00
Reijo Tomperi 35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Robert Reif 67fafd4028 Fixed (typedef struct incorrectly simplified) 2010-04-12 19:05:31 +02:00
Daniel Marjamäki e9b4ea44a2 Refactoring: Disable inconclusive checks. They can still be activated for debugging/testing purposes 2010-04-10 14:05:33 +02:00
Zachary Blair 3152816619 Fixed (Tokenizer: delete register keyword everywhere) 2010-04-10 09:58:09 +02:00
Reijo Tomperi 6dc3860ae9 Fix more -Wshadow compile warnings 2010-04-09 22:40:37 +03:00
Robert Reif bc0a318b6d Fixed (unnamed anonymous struct can segfault) 2010-04-08 17:40:23 +02:00
Daniel Marjamäki f5b1a4db36 Refactoring unit testing 2010-04-04 19:28:15 +02:00
Daniel Marjamäki 0cad22314e Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup. 2010-04-02 07:30:58 +02:00
Martin Ettl 193aa7d1d3 astyle fix 2010-04-02 02:21:53 +02:00
Robert Reif 62d2845014 Fixed (false negatives: array index out of bounds) 2010-03-28 15:56:13 +02:00
Reijo Tomperi 86fabd03b3 Fix (hang due to commit 772aa95c8a)
http://sourceforge.net/apps/trac/cppcheck/ticket/1532
2010-03-27 21:52:31 +02:00
Robert Reif 9c2248254e Here is a patch that adds support for derived structs and fixes a bug that missed some nested structs. () 2010-03-19 16:17:25 +01:00
Robert Reif 5ea7e32bf9 Partial fix for (false positives: function can be const and struct or union member is never used) 2010-03-18 18:14:52 +01:00
Daniel Marjamäki 89719b023e unit testing: made Tokenizer functions public so they can be unit tested 2010-03-17 22:08:02 +01:00
Robert Reif b3856cbc5e Fixed (typedef name hiding check combined with forward declaration leeds to false positive) 2010-03-17 17:31:08 +01:00
Daniel Marjamäki 12c45a1aba Fixed (false positive: Uninitialized variable) 2010-03-16 19:53:09 +01:00
Daniel Marjamäki 772aa95c8a Fixed (false positive: Uninitialized variable when pointer given to struct) 2010-03-13 11:52:48 +01:00
Daniel Marjamäki 587081cab5 Fixed (Invalid warning about shadowed variable) 2010-03-10 16:47:39 +01:00
Daniel Marjamäki 770d2ff835 Simplify enum: Fixed segmentation fault if code ends with enum type id 2010-03-07 13:01:56 +01:00
Daniel Marjamäki fa493b7fd1 Fixed (segmentation fault of cppcheck) 2010-03-07 12:50:45 +01:00
Reijo Tomperi b88126a669 Fix (False positive: Resource leak when fclose() is inside while)
http://sourceforge.net/apps/trac/cppcheck/ticket/1469
2010-03-06 16:28:52 +02:00
Daniel Marjamäki fe30c1ca9d Fixed (false positive: uninitialized variable) 2010-03-06 13:48:43 +01:00
Reijo Tomperi d881fd7a31 Partial fix (takes too long (days) to process some files)
Fix template functions that return "&T".
http://sourceforge.net/apps/trac/cppcheck/ticket/1464
2010-03-03 23:02:32 +02:00
Daniel Marjamäki 50210857a6 Fixed (false positive: memory leak when using realloc) 2010-02-27 19:41:14 +01:00
Daniel Marjamäki a8ee4a03f0 Fixed (PATCH: Variable hides typedef with same name false positive) 2010-02-27 07:27:51 +01:00
Daniel Marjamäki ce0131a1e6 Fixed (false positive: Memory leak in while loop) 2010-02-26 22:14:56 +01:00
Robert Reif 54bf67e766 Fixed (PATCH: Variable hides typedef with same name false positive) 2010-02-26 21:43:00 +01:00
Robert Reif f4d600e93b Fixed (PATCH: Variable hides enumerator with same name false negative) 2010-02-26 21:40:57 +01:00
Daniel Marjamäki 377d3091a9 Fixed (Simplify goto better) 2010-02-25 20:03:39 +01:00
Robert Reif f9d444ed52 Fixed (segfault in Tokenizer::simplifyRedundantParanthesis()) 2010-02-25 07:24:32 +01:00
Reijo Tomperi 01c5bdfc68 Add TODO test case for (Simplify goto better)
http://sourceforge.net/apps/trac/cppcheck/ticket/1452
2010-02-24 22:55:16 +02:00
Robert Reif 7d8adfb4df Fixed (segmentation fault of cppcheck) 2010-02-24 17:50:02 +01:00
Robert Reif d9df3d5c6e Fixed (### Internal error in Cppcheck. Please report it.) 2010-02-23 22:12:55 +01:00
Robert Reif 24628013f1 Fixed (new check: check for typedef name hiding) 2010-02-20 09:07:29 +01:00
Robert Reif 5c6ec0364d Fixed (### Internal error in Cppcheck. Please report it.) 2010-02-18 07:24:24 +01:00
Robert Reif deb71fc566 Fixed (false positive: operator = should return reference to itself) 2010-02-17 22:42:08 +01:00
Robert Reif f15c408f13 Fixed (enum token/template parameter confusion - False positive) 2010-02-16 07:33:23 +01:00
Daniel Marjamäki 8853f304af Fixed (False positive: (error) Possible null pointer dereference) 2010-02-08 18:25:08 +01:00
Daniel Marjamäki ed8f3bc806 Fixed (Internal error when using ?-operator and nested {}) 2010-02-07 09:14:59 +01:00
Daniel Marjamäki 0a31e5e3ee Fixed (false positive: uninitialized variable) 2010-02-06 16:51:32 +01:00
Robert Reif b78845174d Fixed (Fixed enum bug when expression contain comma) 2010-02-06 09:49:56 +01:00
Robert Reif 6cbfc5f894 Fixed (add expression support to simplifyEnum) 2010-02-05 07:37:17 +01:00
Daniel Marjamäki 0ba665d77f Fixed (Division by zero with __alignof__()) 2010-02-03 21:23:44 +01:00
Robert Reif f2eac901c0 Fixed (simplifyTypedef doesn't support deeply nested classes) 2010-02-03 07:58:36 +01:00
Robert Reif b704fc7bc7 Fixed (add nested struct support to simplifyEnum and simplifyTypedef) 2010-02-01 19:59:24 +01:00
Robert Reif 64afcc8179 Fixed (simplify typedefs with global and nested namespace) 2010-01-31 21:46:18 +01:00
Daniel Marjamäki 1375a60e3f Fixed (improve check: Unintialized variable not detected when using a reference (&)) 2010-01-31 16:29:12 +01:00
Daniel Marjamäki 1a59e1bc68 Tokenizer: remove redundant assignments and variables 2010-01-31 09:52:19 +01:00
Daniel Marjamäki e15a16eb15 Tokenizer: Remove redundant assignments and variables 2010-01-31 09:33:57 +01:00
Daniel Marjamäki e1efad0c27 Tokenizer: remove the keyword 'inline' 2010-01-31 08:11:29 +01:00
Robert Reif d17d199415 Tokenizer: fix for multiple array definitions for a single typedef 2010-01-31 07:16:19 +01:00
Robert Reif 7cbdb9f8a1 Fixed (simplify typedef of complex arrays) 2010-01-30 19:41:22 +01:00
Daniel Marjamäki 8716c771a4 Tokenizer: improved the simplifyInitVar 2010-01-30 14:25:11 +01:00
Daniel Marjamäki 3b08712930 Fixed (improve check: nullpointer dereference not found when it is initialized with NULL-cast) 2010-01-30 09:33:16 +01:00
Robert Reif 882e2225e0 Fixed 1329 (simplify typedef of function pointer returning template) 2010-01-30 08:00:11 +01:00
Daniel Marjamäki f9d5fb3191 Fixed (False positive: Redundant code: Found a statement that begins with numeric constant) 2010-01-29 22:28:49 +01:00
Robert Reif fc54ed1eef Fixed (remove simplified enum definitions) 2010-01-29 15:57:26 +01:00
Robert Reif 45b6b9e5a1 Fixed (### Internal error in Cppcheck. Please report it.) 2010-01-27 19:03:24 +01:00
Robert Reif 8be8c266ac Fixed (unnamed enums not simplified properly) 2010-01-25 07:45:16 +01:00
Robert Reif 989e8393e4 Fixed (Internal error with typedef in parameter list) 2010-01-24 22:40:35 +01:00
Daniel Marjamäki 65881b9346 Fixed (False Negative : memory leak with template class) 2010-01-24 20:04:09 +01:00
Daniel Marjamäki 8a9eba980b Function pointers: re-enabled the simplifyFunctionPointers 2010-01-23 07:43:12 +01:00
Robert Reif 13ca2510cc Fixed ((error) ### Internal error in Cppcheck. Please report it. (typedef in fun proto)) 2010-01-22 20:26:07 +01:00