Robert Reif
597aea9f15
save start of function '{' and start of variable declaration in symbol database so checks don't have to find them
2011-02-20 08:25:42 -05: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
7dd8a3283a
fix comment in CheckClass::initializeVarList
2011-02-19 20:09:07 -05:00
Robert Reif
fef1142997
fix #2592 (False positive: 'operator=' should return reference to self)
2011-02-19 20:02:16 -05:00
Greg Hewgill
d20987c3da
Merge branch 'inline-suppression-c-style'
2011-02-20 13:26:35 +13:00
Greg Hewgill
98ab34b2b5
Support cppcheck-suppression in C style comments
2011-02-20 11:44:42 +13:00
Daniel Marjamäki
5f0206725b
Null pointers: Fixed false negative for such code 'if (p && *p==0) {} *p = 0;'. Ticket: #2379
2011-02-19 21:28:18 +01:00
Daniel Marjamäki
29d05cf5f2
Null pointers: Fixed false negative for such code: 'abc->a = 0; if (abc && ..'. Ticket: #2379
2011-02-19 21:10:31 +01:00
Daniel Marjamäki
e7ef1b3627
Null pointer: fixed false negative when dereferencing struct and then checking if it's null. Ticket: #2379
2011-02-19 21:01:38 +01:00
Robert Reif
e6eb160395
fix [B#2589 (segmentation fault of cppcheck (struct B : A))
2011-02-19 14:38:00 -05:00
Daniel Marjamäki
caca6e94e6
Fixed #2231 (uninitialized variable: undetected when initialization in for loop)
2011-02-19 20:19:46 +01:00
Robert Reif
77fe9858e2
fix #2587 (Spurious warning about struct hiding typedef)
2011-02-19 14:18:37 -05:00
Robert Reif
f9b1505115
fix Scope::findInNestedListRecursive to check all children
2011-02-19 13:40:02 -05:00
Daniel Marjamäki
85b1ea21cf
Fixed #2590 (segmentation fault of cppcheck ( {}int ))
2011-02-19 09:56:17 +01:00
Greg Hewgill
7e5d8e42d4
remove stray BOM from source file
2011-02-19 16:10:50 +13:00
Daniel Marjamäki
f363bc1560
Borland C++: Fixed compiler error
2011-02-18 20:21:48 +01:00
Daniel Marjamäki
9a760b9654
Fixed #2582 (segmentation fault of cppcheck ( if() ))
2011-02-18 20:05:44 +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
cf2a04377e
Fixed #2586 (segmentation fault of cppcheck (template<>))
2011-02-17 21:15:17 +01:00
Greg Hewgill
e2581da30c
Merge branch 'unmatched-suppressions'
2011-02-17 21:46:43 +13:00
Greg Hewgill
a4de6a3455
be sure to list unmatched suppressions only for the currently processed file
2011-02-17 21:46:14 +13:00
Daniel Marjamäki
0ee583e324
Fixed gcc compiler warnings (signedness)
2011-02-16 20:56:02 +01:00
Daniel Marjamäki
54e0b60cc5
Fixed #2584 (false positive 'variable n is never used')
2011-02-16 20:33:24 +01:00
Greg Hewgill
5d74325015
implement unmatchedSuppression information message
2011-02-16 23:02:37 +13:00
Greg Hewgill
331788246b
factor out addSuppressionLine from file reading function
2011-02-16 22:26:16 +13:00
Greg Hewgill
8a85b18283
use suppression wildcard glob instead of special-case empty filename
2011-02-16 20:19:18 +13:00
Robert Reif
218464df89
fix #2580 (false postive with Unused private function)
2011-02-14 19:50:13 -05:00
Daniel Marjamäki
0ed0d07714
Tokenizer::simplifyCalculations: basic handling of bitwise operators
2011-02-14 20:43:26 +01:00
Daniel Marjamäki
805773663e
Build: Renamed HAVE_DEPENDENCIES to HAVE_RULES
2011-02-14 19:37:58 +01:00
Robert Reif
cdd8d3f785
Really fix #2348 perl-tk
2011-02-13 19:02:57 -05:00
Ettl Martin
d2a1d3f14a
fixed pre/post increment warings, found during selfcheck
2011-02-13 23:57:07 +01:00
Daniel Marjamäki
0d2d0c864a
Tokenizer::simplifyKnownVariables: Fixed TODO testcases (better handling of comparisons)
2011-02-13 22:24:45 +01:00
Daniel Marjamäki
2182ede486
Tokenizer::simplifyKnownVariables: Fixed TODO testcase (better handling of ^)
2011-02-13 22:13:19 +01:00
Daniel Marjamäki
472d8154ca
Tokenizer::simplifyKnownVariables: Fixed TODO testcase (better handling of |)
2011-02-13 22:09:04 +01:00
Daniel Marjamäki
467c984cd1
Tokenizer::simplifyKnownVariables: Fixed TODO testcase (better handling of %)
2011-02-13 22:03:46 +01:00
Robert Reif
c03ace7378
Fix #2579 (segmentation fault of cppcheck)
2011-02-13 14:11:22 -05:00
Robert Reif
ad22aebf8c
Really fix : #2376 (simplifyTypedef: upx-ucl)
2011-02-13 13:34:55 -05:00
Daniel Marjamäki
d8da1ac390
Merge branch 'suppress-glob' of https://github.com/ghewgill/cppcheck into ghewgill-suppress-glob
2011-02-13 18:17:44 +01:00
Greg Hewgill
1418c12261
astyle formatting
2011-02-13 10:01:32 +13:00
Greg Hewgill
421b32efb4
use std::stack instead of std::list where appropriate
2011-02-13 09:55:45 +13:00
Robert Reif
2aefa5deb5
fix #2577 (segmentation fault of cppcheck)
2011-02-12 15:35:48 -05:00
Daniel Marjamäki
de75bdfed5
Tokenizer: comments/refactorings
2011-02-12 21:11:20 +01:00
Daniel Marjamäki
4d1aae5859
Tokenizer::simplifyTemplates: Broke out the functionality that instantiates a template
2011-02-12 20:58:45 +01:00
Daniel Marjamäki
9021f0f180
Tokenizer::simplifyTemplates: Broke out the functionality that handles default template arguments
2011-02-12 20:27:44 +01:00
Daniel Marjamäki
00bdf618f2
Tokenizer::simplifyTemplates: Broke out the functionality that extract a list of template instantiations
2011-02-12 20:17:58 +01:00
Daniel Marjamäki
25d6bfe3c4
Tokenizer::simplifyTemplates: broke out the functionality that extract a list of template declarations
2011-02-12 20:12:07 +01:00
Daniel Marjamäki
654116af61
Tokenizer::simplifyTemplates: Broke out handling for 'template<>..'
2011-02-12 19:43:33 +01:00
Daniel Marjamäki
518a495334
Fixed #2576 (False positive: (error) Buffer access out-of-bounds)
2011-02-12 18:34:12 +01:00
Daniel Marjamäki
07e8325e50
Fixed #2549 (segmentation fault of cppcheck)
2011-02-12 16:51:59 +01:00
Daniel Marjamäki
7507f64ee7
Fixed #2558 (false positive: (error) Returning reference to auto variable)
2011-02-12 15:39:26 +01:00
Daniel Marjamäki
2657d36d03
Fixed #2502 (False positive: redundant assingment of object to itself)
2011-02-12 14:27:07 +01:00
Daniel Marjamäki
318f2e8a57
Fixed #2561 (False positive on array index when using conditional operator)
2011-02-12 11:31:10 +01:00
Daniel Marjamäki
63ade3e4f6
Tokenizer::simplifyKnownVariables: Split up the function into smaller functions. Broke out ..GetData function that extracts info about assigned variable before the simplification is made.
2011-02-12 09:24:20 +01:00
Daniel Marjamäki
27febb062b
cppcheck: Added HAVE_DEPENDENCIES define. Cppcheck cli can be compiled without dependencies.
2011-02-12 08:06:59 +01:00
Robert Reif
78b5361ec8
fix #2568 (False positive: (style) Union 'A_t' hides typedef with same name (forward declaration))
2011-02-11 19:09:24 -05:00
Sébastien Debrard
f5ed52b84b
fix #2569 check postfix increment on boolean
2011-02-11 23:38:23 +01:00
Daniel Marjamäki
951a81d0d2
Tokenizer::simplifyKnownVariables: Broke out the simplification into a separate function
2011-02-11 20:12:51 +01:00
Daniel Marjamäki
227a6100f7
astyle formatting
2011-02-11 19:31:37 +01:00
Greg Hewgill
f2f2d1f885
Fixed #2571 (Preprocessor: better handling for #undef)
2011-02-11 18:51:22 +01:00
Greg Hewgill
751f8d46e5
Fixed #2570 (Preprocessor: #define parsing when there is no whitespace between a macro symbol and its double-quoted string expansion)
2011-02-11 18:01:27 +01:00
Robert Reif
b8c5426bb8
fix #2567 Unused private function when implemented in different file
2011-02-11 08:00:41 -05:00
Erik Lax
b3e8ef9d48
Fixed #2559 (Refactoring Preprocessor::read)
2011-02-11 06:30:42 +01:00
Daniel Marjamäki
08811c8179
CheckBufferOverrun: Refactoring. Broke out checkScope code for parsing 'for' bodies
2011-02-10 21:56:06 +01:00
Reijo Tomperi
a71204b8e3
Change "tinyxml/tinyxml.h" includes into <tinyxml.h> and modify dmake to work with it.
...
This should allow usage of libtinyxml-dev or such libraries without modifications to code or makefile.
2011-02-10 22:35:48 +02:00
Robert Reif
2900d44ff0
#2560 (False positive: The class 'Altren' does not have a constructor, because base class is in namespace.)
2011-02-10 07:37:55 -05:00
Robert Reif
e6848aef98
Tokenizer: refactor duplicated token copy code info function
2011-02-09 22:02:17 -05: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
Robert Reif
301f83767e
replace tok->strAt(0) with tok->str()
2011-02-09 07:45:19 -05:00
Robert Reif
7502cea4d3
Fixed #2554 (simplifyTypedef: wrong simplification for sizeof(array))
2011-02-08 19:47:14 -05:00
Daniel Marjamäki
56ae77ba87
Fixed #2555 (Cppcheck 1.47 - Crash on WinMerge-Trunk (Win7 x64))
2011-02-08 20:18:15 +01:00
Erik Lax
aeae5a867d
Fixed #2550 (Bad substr/strncmp comparison)
2011-02-08 19:49:29 +01:00
Greg Hewgill
7a219b1fb8
support wildcard characters * and ? in suppression list
2011-02-09 00:19:57 +13:00
Greg Hewgill
a9f2879889
factor out file matching into own class
2011-02-09 00:19:56 +13:00
Robert Reif
1e0d538273
checkautovariables: refactor to use the symbol database
2011-02-07 19:26:34 -05:00
Daniel Marjamäki
7c9e52546d
Fixed #2552 (preprocessor check XX is already guaranteed to be defined -- too eager?)
2011-02-07 20:26:29 +01:00
Daniel Marjamäki
4a7c56f970
1.47: Updated versions
2011-02-06 12:05:42 +01:00
Zachary Blair
44a350a6dc
Ticket #2388 . Added more detail to the 'exceptRethrowCopy' error message.
2011-02-06 02:01:14 -08:00
Zachary Blair
daa04872a0
Merge branch 'master' of github.com:danmar/cppcheck
2011-02-06 01:31:09 -08:00
Daniel Marjamäki
f7dcf2d3b9
Tokenizer: Added a comment about sizeof for struct/class. We always assume that the size is 100
2011-02-06 09:58:07 +01:00
Zachary Blair
8a494cf8bb
Fixed #2388 (Use throw without argument to rethrow exceptions)
2011-02-05 01:11:09 -08:00
Robert Reif
95e917b27f
Tokenizer: Replace __null with 0 (gcc constant)
2011-02-05 09:03:31 +01:00
Robert Reif
c592ccd35d
Fixed #2547 (segmentation fault of cppcheck)
2011-02-05 08:59:59 +01:00
Daniel Marjamäki
5640845a17
Fixed #2498 (False positive: redundant assignment)
2011-02-04 21:08:42 +01:00
Daniel Marjamäki
d06fde77ff
Fixed #2531 (False positive: Redudant assignment to itself)
2011-02-04 20:55:38 +01:00
Daniel Marjamäki
dbc5929fa2
Fixed #2503 (false positive: memory leak (struct member, address is taken))
2011-02-04 20:41:35 +01:00
Robert Reif
f87056fca3
Fixed #2539 (segmentation fault of cppcheck)
2011-02-04 20:19:49 +01:00
Robert Reif
514c9b9b23
Fixed #2546 (make CheckMemoryLeakInClass also check structures)
2011-02-04 20:17:25 +01:00
Daniel Marjamäki
447d29938e
Fixed #2544 (XML output does not specify encoding used)
2011-02-04 20:14:19 +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
Daniel Marjamäki
39c68e12ce
Fixed #2533 (false positive: (error) Uninitialized variable: cBuffer)
2011-02-03 22:29:32 +01:00
Daniel Marjamäki
398190460f
astyle formatting
2011-02-03 22:20:59 +01:00
Robert Reif
e9ec4bc3e4
Fixed #2536 (cppcheck hangs with 100% cpu load)
2011-02-03 07:58:49 +01:00
Robert Reif
8288c28b3f
Fixed #2537 (segmentation fault of cppcheck)
2011-02-03 07:57:10 +01:00
Raphael Geissert
c9a0d95e89
A few more Token::Match -> ::simpleMatch replacements
2011-02-02 13:27:02 -06:00
Raphael Geissert
f8e2d50e6f
Use Token::simpleMatch where no special patterns are needed
2011-02-02 13:27:02 -06:00
Raphael Geissert
45e5dc20a2
Try to match custom rules as many times as possible, not just once
2011-02-02 13:27:02 -06:00
Raphael Geissert
15dceed6cd
Remove uneeded indentation
2011-02-02 13:27:01 -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