Simon Martin
d67a0add47
Ticket #5024 : Don't crash upon invalid code when checking auto variables.
2013-09-28 00:14:12 +02:00
Frank Zingsheim
67915749b0
Fixed #4723 (False positive: Pure virtual call within conditional clause)
...
conditional clauses directly in constructor/destructor cannot prevent
pure virtual function call otherwise this part of the code would never been called
2013-09-27 09:25:38 +02:00
Martin Ettl
ea5bcfaa35
Fixed #5040 - simplify more math functions.
2013-09-26 00:44:16 +02:00
Frank Zingsheim
445d08d082
Fixed #4723 (False positive: Pure virtual call within conditional clause)
2013-09-26 17:25:16 +02:00
Robert Reif
44d86e97c0
Fixed #4920 (Microsoft ATL/MFC CString::Format argument checking)
2013-09-26 16:20:01 +02:00
Robert Reif
2de3ebcb1e
CheckIO: fixed some more false negatives. Ticket: #4964
2013-09-24 06:43:03 +02:00
Daniel Marjamäki
17c0bb3cab
revert 027e5cc8
. the div() standard function should not be reimplemented. create a different fix. Ticket: #4929
2013-09-23 18:01:15 +02:00
Daniel Marjamäki
698e9e2b59
reverted ee14ea4f
. I think this fix was too generic. If there is a union in the struct then only the union members should be skipped.
2013-09-23 17:52:42 +02:00
Daniel Marjamäki
ee14ea4fc2
Fixed #4907 (False positive "uninitStructMember" on structs with unions)
2013-09-23 07:20:20 +02:00
Daniel Marjamäki
64454068ec
Fixed #4934 (false positive: Uninitialized variable (loop with inner condition '(x=1)'))
2013-09-23 06:07:01 +02:00
Daniel Marjamäki
1feabd0f0a
astyle formatting
2013-09-23 06:03:44 +02:00
Daniel Marjamäki
d1c9cac155
Merge pull request #170 from simartin/clang_warnings_2
...
Remove warnings emitted by clang's -Wsign-conversion
2013-09-22 20:42:10 -07:00
Simon Martin
894f537eba
Remove warnings emitted by clang's -Wsign-conversion
2013-09-22 13:22:52 +02:00
Daniel Marjamäki
027e5cc860
Fixed #4929 (false positive: Division by zero (standard function div()))
2013-09-22 09:52:12 +02:00
Robert Reif
5c4c397372
CheckIO: add scanf argument type checking. Floating point and integer checking is complete but string checking is incomplete and character checking is missing. Ticket #4099
2013-09-22 06:56:31 +02:00
Alexander Mai
6eab4abaf2
Fixed #5030 (Segmentation fault below CheckMemoryLeakStructMember::isMalloc())
2013-09-21 18:10:29 +02:00
Daniel Marjamäki
965d8f0ecc
Fixed #5033 (segmentation fault (valid code) in CheckOther::checkZeroDivisionOrUselessCondition)
2013-09-21 17:44:25 +02:00
Lucas Manuel Rodriguez
2fce3e6104
Fixed #5037 (Add missing C++ std objects and types)
2013-09-21 12:13:35 -03:00
Martin Ettl
d5f514c820
Fixed #5031 : simplify labs|fabs|abs(-1) to 1.
2013-09-21 16:59:06 +02:00
Daniel Marjamki
3de9431507
Fixed #5022 (Improve check: Division by zero or useless condition, function call)
2013-09-15 17:46:52 +02:00
Robert Reif
19745bbb7d
Fixed #5021 (Confusing message about %lf format in printf())
2013-09-15 16:38:45 +02:00
Ettl Martin
5a671f8914
Fixed #5023 (Add support for asinf,acosf,asinl,acosl (...) functions)
2013-09-13 19:49:25 +02:00
Daniel Marjamäki
bcbcee87d5
Library: Changed 'rt' to 'rb' when open files. TinyXml won't choke on CRLF in Windows then. Thanks sam-truscott for telling me this.
2013-09-13 07:26:52 +02:00
Robert Reif
4d82e37078
Fixed #5021 (Confusing message about %lf format in printf())
2013-09-12 05:54:05 +02:00
Daniel Marjamäki
ddefe62c12
astyle formatting
2013-09-11 15:49:40 +02:00
Daniel Marjamäki
418a3d8399
spelling fix: desctructor => destructor
2013-09-09 06:14:41 +02:00
flashm
f56a85358b
preprocessor optimization, unnecessary map creation removed
...
it used to be O(n^2), now it's only O(n)
2013-09-09 05:48:07 +02:00
Robert Reif
9be2f6b5d4
Fixed #4964 (printf format argument check only supports simple variables)
2013-09-08 20:21:00 +02:00
Daniel Marjamäki
4b1254bc8d
Merge pull request #168 from simartin/ticket_4994
...
Ticket #4994 : Don't crash when checking variable scope for invalid input
2013-09-08 06:57:42 -07:00
Simon Martin
843833f907
Ticket #4994 : Don't crash when checking variable scope for invalid input.
2013-09-07 21:16:25 +02:00
Daniel Marjamäki
51ad747317
Fixed false positive in new 'x>-1<5' check when using templates
2013-09-07 18:24:35 +02:00
Daniel Marjamäki
0d246f84ca
checkZeroDivisionOrUselessCondition: Refactoring
2013-09-07 17:54:34 +02:00
Daniel Marjamäki
6bb6506ce2
checkZeroDivisionOrUselessCondition: Fixed false positive when function is called and variable is passed to it
2013-09-07 16:18:11 +02:00
Daniel Marjamäki
08556d071e
Fixed #5016 (false negative: condition is always true / comparing boolean result with '<' (x > -1 < 5))
2013-09-07 11:32:11 +02:00
Daniel Marjamäki
83c460fc56
Fixed #5017 (New check: division by zero, otherwise condition is redundant)
2013-09-07 07:40:10 +02:00
Daniel Marjamäki
40c5924292
CheckIO: Handle classes derived from STL
2013-09-07 07:20:06 +02:00
Robert Reif
489a3a6e53
Fixed #5015 (strings not being concatinated properly)
2013-09-06 05:36:33 +02:00
Daniel Marjamäki
9000c233fa
Fixed #5012 (Hang when there is syntax error 'else }')
2013-09-05 06:38:07 +02:00
Robert Reif
2fe91e290c
CheckIo: Improved %d handling
2013-09-05 06:04:41 +02:00
Daniel Marjamäki
0ba7e4d5ed
astyle formatting
2013-09-05 01:47:22 +02:00
Robert Reif
921a1aaa4f
CheckIO: Improved handling of %u
2013-09-05 01:46:58 +02:00
Ettl Martin
9ab6655d85
Fixed #5007 (Same include guard naming)
2013-09-04 20:59:49 +02:00
Daniel Marjamäki
3b8e9f5a2a
Fixed #4899 (False positive on unused variable)
2013-09-03 17:02:46 +02:00
PKEuS
8e84f30244
Refactorization: Make use of Function::retDef where it makes sense
2013-09-03 11:40:43 +02:00
PKEuS
b36a887608
Fixed false positive #5004
2013-09-03 10:54:10 +02:00
PKEuS
6b47ed414a
Fixed Function::retDef initialization:
...
- Move/Copy Constructors and Destructors do not have a return type neither
- Fixed crash in SymbolDatabase::printOut
- Added testing
2013-09-03 10:48:01 +02:00
Daniel Marjamäki
5d7518aa57
simplifyCalculations: Improved handling of casts ( #4899 )
2013-09-03 06:27:11 +02:00
Robert Reif
0dddd424a4
CheckIO: Improved handling of function return type
2013-09-03 05:50:19 +02:00
Daniel Marjamäki
6819f5ed18
Fixed #4860 (Segfault with another Clucene file)
2013-09-02 05:58:55 +02:00
Daniel Marjamäki
a781a83822
Preprocessor: Quicker response for --check-config. No 'normal' code is needed so skip it.
2013-09-01 07:13:48 +02:00
Robert Reif
8790f6d73f
Fixed #4999 (Crash with simple code snipped in rev ab30fa3
)
2013-08-31 18:58:55 +02:00
Daniel Marjamäki
6b260c481c
CppCheck: Don't run preprocessor rules when --check-config is used
2013-08-31 18:38:52 +02:00
Daniel Marjamäki
ab30fa34e4
Refactoring Preprocessor. Use ternary operator instead of if-else.
2013-08-31 16:13:52 +02:00
Daniel Marjamäki
ed58b63712
Preprocessor: improved handling when file starts with 0xff or 0xfe that is not part of a BOM
2013-08-31 13:17:57 +02:00
Daniel Marjamäki
5e7791d847
astyle formatting
2013-08-31 13:17:15 +02:00
Daniel Marjamäki
997c9ce100
Refactor CppCheck::_fileContents to a function parameter
2013-08-31 10:28:21 +02:00
Daniel Marjamäki
e6686dfb5b
Cleanup CppCheck::dependencies()
2013-08-31 10:13:47 +02:00
Robert Reif
05f2f0e419
CheckIO: improved type info - keep track of original typename.
2013-08-31 06:26:39 +02:00
Lucas Manuel Rodriguez
92b7280d13
Fixed #4995 (False positive - Using 'memset' on class that contains a virtual method) - Better fix
2013-08-30 22:06:20 -03:00
Lucas Manuel Rodriguez
c26674dc97
Fixed #4995 (False positive - Using 'memset' on class that contains a virtual method)
2013-08-30 08:46:33 -03:00
Daniel Marjamäki
4a1d1ce1a1
Fixed #3471 (Unused functions: take __attribute__((constructor)) in to consideration)
2013-08-30 06:27:46 +02:00
Robert Reif
fc435ae9aa
CheckIO: fix false negative for a function in a base class not being found, fix false positives and negatives for std::vector operator []
2013-08-30 05:41:59 +02:00
Lucas Manuel Rodriguez
acd65a6829
Fixed #4991 : False Positive - Dangerous usage of 'arr' (not null-terminated)
2013-08-29 08:12:05 -03:00
Robert Reif
2950eb08cb
CheckIO: fix some %I64 related false positives. Ticket: #4964
2013-08-29 05:49:16 +02:00
Daniel Marjamäki
3bd1d53c75
Fixed #4941 (segmentation fault (invalid code) in Tokenizer::setVarId)
2013-08-28 19:52:41 +02:00
Daniel Marjamäki
2eca0a93a7
Fixed #4733 (defective unusedStructMember warning)
2013-08-28 06:46:32 +02:00
Robert Reif
5c3315db7a
CheckIO: improved handling of functions returning pointers. Ticket: #4964
2013-08-28 05:57:40 +02:00
Ettl Martin
e223e13747
Fixed #4987 (spellfix for verbose message in CheckClass::noConstructorError)
2013-08-28 05:48:31 +02:00
Daniel Marjamäki
65d99feddf
fix
2013-08-27 15:46:51 +02:00
Robert Reif
228f6b1a87
Fixed #4984 (False positive: (warning) %f in format string (no. 1) requires a floating point number given in the argument list.)
2013-08-27 05:46:09 +02:00
Daniel Marjamäki
80093f0a40
Fixed #4689 (False positive: Unused private function (used in default argument of constructor))
2013-08-26 16:41:23 +02:00
Robert Reif
a1b9bb0688
CheckIO: Fix false positives for functions returning unknown types and false negatives for functions returning record types
2013-08-26 06:03:26 +02:00
Alexander Mai
450442287c
Fixed #4974 (CheckBufferOverrun::writeOutsideBufferSize() too strict)
2013-08-25 18:46:07 +02:00
Daniel Marjamäki
acdbbeee44
Fixed #4913 (Tokenizer::simplifyKnownVariables: wrong handling of *--p=0;)
2013-08-25 08:54:33 +02:00
Robert Reif
3d9383aabb
Fixed #4975 (False positive: (warning) %s in format string (no. 3) requires a char* given in the argument list. (git/column.c))
2013-08-25 08:32:10 +02:00
Robert Reif
3c6ca35e09
Fixed #4977 (improve platform type tokenize performance)
2013-08-25 08:29:24 +02:00
Daniel Marjamäki
b20f44cf6a
Merge pull request #167 from simartin/ticket_4450
...
Fix Ticket #4450
2013-08-24 14:12:44 -07:00
Robert Reif
26de3646e9
CheckIo: Revised patch that fixes bug in class function return type. Ticket: #4964
2013-08-24 22:34:52 +02:00
Simon Martin
b713a69b30
Ticket #4450 : Handle comma separated static variable declarations with initializers in brackets.
2013-08-24 22:27:54 +02:00
Lucas Manuel Rodriguez
a70b0cd0f3
Fixed FP: Null pointer dereference
2013-08-24 16:50:19 -03:00
Daniel Marjamäki
f8f3f0d384
astyle formatting
2013-08-24 07:37:21 +02:00
Daniel Marjamäki
5ce7189bc0
Merge pull request #166 from last5bits/ticket4213
...
Fixing #4213 arrayIndexThenCheck and adding tests
2013-08-23 22:36:30 -07:00
Robert Reif
01fd156852
CheckIO: Start to add checking of function return types. Ticket: #4964
2013-08-24 07:25:50 +02:00
Alexey Zhikhartsev
d24a321ba2
Fixing #4213 arrayIndexThenCheck and adding tests
2013-08-23 19:04:01 +04:00
Daniel Marjamäki
9b4f6a6b3d
Fixed #4701 (false positive unusedFunction when using templates)
2013-08-23 06:47:52 +02:00
Robert Reif
5ce1933687
CheckIo: handle more complex variables
2013-08-23 05:35:57 +02:00
Alexander Mai
986ec42d79
Fixed #4937 (false positive: Assert calls a function which may have desired side effects)
2013-08-22 06:38:54 +02:00
Daniel Marjamäki
c96586b2a9
"automatic conversion from iso-8859-1 formatting to utf-8"
2013-08-21 19:31:01 +00:00
Daniel Marjamäki
b61c4b24b4
Fixed syntax error
2013-08-21 16:32:10 +02:00
Daniel Marjamäki
2995b5c3d7
Merge pull request #165 from stefanbeller/stack
...
symboldatabase: Remove unneeded check
2013-08-21 07:30:12 -07:00
Daniel Marjamäki
f257c62858
Fixed #4846 (false positive: (warning) Comparison of a boolean with an integer.)
2013-08-21 16:17:19 +02:00
Stefan Beller
e0d71de23a
symboldatabase: Remove unneeded check
...
scope1 cannot be null at that point of time. If it were, the program
would have crashed, before (it's dereferenced ->)
This commit doesn't just remove dead code, but eliminates a tricky bug,
possibly introduced by over-optimizing compilers:
An explanation why the compiler could produce bad code here is found at
http://blog.regehr.org/archives/970
This commit was enabled by http://css.csail.mit.edu/stack/
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
2013-08-20 14:06:20 +02:00
Lucas Manuel Rodriguez
006b8055e5
Fixed #4676 (Duplicated inherited member check)
2013-08-20 06:29:19 +02:00
Lucas Manuel Rodriguez
14d3886e19
Fixed #4965 (sizeof(void) check - error in message)
2013-08-20 06:20:52 +02:00
Robert Reif
707dfb4eea
Fixed #4964 (printf format argument check only supports simple variables)
2013-08-20 06:16:31 +02:00
Robert Reif
bf8a786265
reduce: add more settings from cppcheck cli
2013-08-19 06:06:53 +02:00
Daniel Marjamäki
342142b783
Fixed #4256 (Preprocessor: '#pragma once' doesn't work properly when using -D)
2013-08-18 18:04:06 +02:00
Daniel Marjamäki
ed890a23a8
Token::printOut(): don't write title if it's empty
2013-08-18 09:01:03 +02:00
Robert Reif
914893013e
Symbol Database: improved type handling. Ticket: #4952
2013-08-17 18:43:15 +02:00
Daniel Marjamäki
13f85ea345
astyle formatting
2013-08-17 13:06:19 +02:00
Daniel Marjamäki
fd545f90db
Merge pull request #163 from simartin/ticket_4959
...
Ticket #4959 : Simplify {in,de}crements of known variables.
2013-08-17 03:35:30 -07:00
Simon Martin
5743416d3e
Ticket #4959 : Simplify {in,de}crements of known variables.
2013-08-16 23:51:00 +02:00
Daniel Marjamäki
67c77a31aa
Fixed #4942 (1.61 is very slow (compared to 1.60.1))
2013-08-16 18:39:56 +02:00
Robert Reif
b777388fb8
Symbol database: improved type handling (fix problems in previous commit). Ticket: #4952
2013-08-16 05:42:12 +02:00
Daniel Marjamäki
33a948f816
Merge pull request #162 from simartin/ticket_4708
...
Fixed #4708 : prefix {in,de}crement too eagerly computed.
2013-08-15 20:35:38 -07:00
Daniel Marjamäki
5d7f30b88f
reassign var: better handling of struct members
2013-08-15 16:13:58 +02:00
Simon Martin
bf09191b78
Fixed #4708 : prefix {in,de}crement too eagerly computed.
2013-08-15 15:53:08 +02:00
Daniel Marjamäki
f95b29db06
Improved handling of the __FILE__ macro
2013-08-14 06:36:03 +02:00
Daniel Marjamäki
fd26bad6fa
AssignIf: Improved handling of function calls
2013-08-13 14:08:54 +02:00
Robert Reif
f420de24ef
SymbolDatabase: Optimisation of previous fix for #4952
2013-08-13 06:36:54 +02:00
Daniel Marjamäki
ff71c94f6e
Fixed #4949 (define symbol used in code => 'Analysis failed' message is written.)
2013-08-12 18:12:49 +02:00
Robert Reif
d6ce072dc9
Fixed #4950 (Tokenizer: order of int modifiers)
2013-08-12 06:23:01 +02:00
Robert Reif
cd3044c808
Fixed #4952 (SymbolDatabase: unknown types in log file)
2013-08-12 06:21:03 +02:00
Alexander Mai
4cc2e3ef54
Enable more doxygen features (include JS search engine) and one doxygen annotation fix
2013-08-11 17:04:13 +02:00
Simon Martin
40887ca99c
Ticket #4703 : Trim macro parameters.
2013-08-11 09:41:03 +02:00
Robert Reif
56d8073d0f
Fixed #4902 (printf and scanf format checks don't support microsoft %I, %I32 and %I64 extensions)
2013-08-10 12:37:31 +02:00
Robert Reif
5aa79198e6
Fixed #4948 (check printf %l and %ll arguments for long and long long)
2013-08-10 12:33:55 +02:00
Daniel Marjamäki
64733d9e63
astyle formatting
2013-08-10 12:32:59 +02:00
Daniel Marjamäki
3ac21ab1db
Merge pull request #158 from simartin/ticket_4764
...
Ticket #4764 : Handle template instantiations with only default parameters
2013-08-10 03:22:41 -07:00
Simon Martin
ad33d95ec1
Ticket #4764 : properly handle template instantiations with only default parameters.
2013-08-10 12:00:16 +02:00
Robert Reif
b940d0adc6
Fixed #4947 (Doesn't allow any ordering of int modifiers)
2013-08-09 23:13:04 +02:00
PKEuS
758d68519d
Use TinyXML to write XML files
2013-08-07 16:30:55 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
PKEuS
dd82817752
Fixed #4943 and simplified CheckOther::checkCommaSeparatedReturn()
2013-08-06 11:27:09 -07:00
PKEuS
1538b46970
Refactorization in checkio.cpp
2013-08-06 10:24:35 -07:00
PKEuS
5e3ccda408
Added support for noreturn functions from library to CheckOther::checkUnreachableCode()
2013-08-06 02:11:59 -07:00
Simon Martin
c9884c30a1
Fix ticket #4922 (segmentation fault upon invalid code).
2013-08-05 20:28:22 +02:00
PKEuS
4a84195a8c
Updated to latest TinyXML
...
Build TinyXML into core dll once and use it from CLI
2013-08-03 20:29:50 +02:00
PKEuS
219f6546d3
Set version to 1.62 dev
2013-08-03 19:54:39 +02:00
Daniel Marjamäki
2f7fba2087
1.61: Set versions
2013-08-03 08:04:38 +02:00
XhmikosR
b2e140389f
* Move system includes before local ones
...
* Remove superfluous newlines
2013-07-31 18:21:06 +03:00
Daniel Marjamäki
2a78db4c06
Refactoring Token::findClosingBracket.
2013-07-31 10:30:20 +02:00
Daniel Marjamäki
6c05f78a8f
Reverted experimental changes for handling of lambda functions ( #4919 ).
2013-07-31 09:58:31 +02:00
Alexander Mai
7a324cef25
Fixed various Cppcheck inconclusive warnings
2013-07-30 12:52:27 +02:00
Daniel Marjamäki
807204e580
Fixed #4237 (False positive: (error) Memory Leak: data (references and pointer aliases))
2013-07-30 11:30:14 +02:00
Daniel Marjamäki
1bebf1fd7e
AssignIf: added todo test case (pass variable by value to function)
2013-07-29 12:27:57 +02:00
Daniel Marjamäki
d9a2f542be
CheckOther: removed redundant conditions. No need to check if varid is > 0 and if there is variable info.
2013-07-29 12:01:52 +02:00
Simon Martin
1fe008ba4b
Ensure wrongPrintfScanfParameterPositionError is shown by 'cppcheck --errorlist'.
2013-07-28 20:33:49 +02:00
Daniel Marjamäki
9ff204f8bc
astyle formatting, use isEnabled("warning") instead of isEnabled("style")
2013-07-28 16:13:16 +02:00
Simon Martin
d01e3fa17a
Handle parameter positions format strings (POSIX extensions).
2013-07-28 15:00:28 +02:00
Daniel Marjamäki
7fd12ee2b5
Merge pull request #153 from simartin/ticket_4930
...
Fixed #4930 ((error) Internal Error: Division by zero)
2013-07-28 04:17:03 -07:00
Daniel Marjamäki
2a1af1acda
CheckUninitVar: Assertion for '} while (' after 'do {..' in debug builds. Bail out in release builds to avoid segfaults.
2013-07-28 12:41:38 +02:00
Simon Martin
eb3bf571be
Avoid divisions by zero when simplifying numeric calculations.
2013-07-28 12:32:18 +02:00
Lucas Manuel Rodriguez
09f4d3732a
Fixed #4911 (segfault, assignment in do ... while, 1.61dev)
2013-07-28 11:58:14 +02:00
Daniel Marjamäki
36ef34a2cf
astyle formatting
2013-07-28 11:53:49 +02:00
Daniel Marjamäki
862eb351d5
Merge pull request #152 from simartin/ticket_4914
...
Fixed #4914 (memory freed twice, when in do {} while being shortcircuited via continue)
2013-07-28 01:43:45 -07:00
Alexander Mai
40fa474a5b
Fixed #4927 (Segfault in CheckOther::checkCommaSeparatedReturn() on invalid code)
2013-07-28 10:39:58 +02:00
Simon Martin
470a9a6c71
Take into account break and continue statements in CheckLeakAutoVar.
2013-07-28 10:26:46 +02:00
Daniel Marjamäki
44333f316a
Added terminate() handling to get quicker response when the user wants to terminate
2013-07-24 13:06:59 +02:00
Daniel Marjamäki
178467a578
astyle formatting
2013-07-24 11:20:28 +02:00
Carlo Marcelo Arenas Belon
aa0560fe3b
Fixed #4925 (False positive: checkother style)
...
When using a variable that is assigned a function pointer checks for
pointers are triggered which would complain if used in arithmetic
comparisions (eventhough it will be valid code if the function returns
an int)
2013-07-24 08:22:24 +02:00
Daniel Marjamäki
a1fafa7f06
Library: added <formatstr> and <strz> to argument checks
2013-07-22 20:21:45 +02:00
Robert Reif
20f81f92d9
CheckIO: Improved handling of h, hh, l, and ll.
2013-07-22 08:28:29 +02:00
Lucas Manuel Rodriguez
7e556c215e
Fixed #4861 (Improve check: object is destroyed immediately not detected when calling overloaded constructor)
2013-07-22 07:25:53 +02:00
Daniel Marjamäki
011fd3bed9
checksizeof: Fixed compiler error on VS. Missing header.
2013-07-21 19:00:12 +02:00
Robert Reif
f11e54aa42
Fixed #4902 (printf and scanf format checks don't support microsoft %I, %I32 and %I64 extensions)
2013-07-21 08:35:01 +02:00
Robert Reif
e6ab8f478b
Symbol database: improved handling of array members
2013-07-20 17:51:13 +02:00
Daniel Marjamäki
37716fb8bb
Tokenizer: Set variable() pointer for array members
2013-07-20 17:46:39 +02:00
Lucas Manuel Rodriguez
59f448da8a
Fixed #4908 (False positive: void * calculation (struct member, cast))
2013-07-20 17:20:16 +02:00
Daniel Marjamäki
0c5e39a813
Library: Added configuration file std.cfg that clients should load.
2013-07-20 17:12:56 +02:00
Daniel Marjamäki
0832734503
Library: Fixed compiler error
2013-07-20 15:40:57 +02:00
Daniel Marjamäki
be5e4ccfd5
Library: Renamed <ignore> to <leak-ignore>
2013-07-20 13:12:24 +02:00
Daniel Marjamäki
9c67af058a
SymbolDatabase: Renamed Variable::varId() to Variable::declarationId() to make it more clear how it works.
2013-07-20 12:31:04 +02:00
Daniel Marjamäki
1a2aaa6780
Library: If load from current path fails, try to load 'default' configuration from cppcheck-executable path. Allow that '.cfg' extension is not used. Allow that multiple configurations are provided (comma separated).
2013-07-20 10:21:05 +02:00
Daniel Marjamäki
dfed6bbea0
Fixed #4445 (Token::Match called with varid 0)
2013-07-19 21:18:54 +02:00
Daniel Marjamäki
794aebe3cf
MathLib: Return inf.0 for NAN and INF calculations
2013-07-19 09:27:33 +02:00
Daniel Marjamäki
f02e885b42
CheckMemoryLeakInFunction: Use <ignore> info from Library
2013-07-19 07:50:54 +02:00
Daniel Marjamäki
6fe1b92a47
Improved --check-library messages
2013-07-16 18:50:25 +02:00
Daniel Marjamäki
fa7f8ddc78
Library: Renamed Argument to ArgumentChecks to make it a bit more clear
2013-07-16 09:40:31 +02:00
Daniel Marjamäki
2a884446be
Library: document not-null and not-uninit argument configuration
2013-07-15 21:58:29 +02:00
Daniel Marjamäki
a01e54fdd9
astyle formatting
2013-07-15 21:57:10 +02:00
Daniel Marjamäki
7b5c58d286
astyle formatting
2013-07-15 21:56:31 +02:00
Daniel Marjamäki
7443883b9c
Library: Improved handling in CheckNullPointer::parseFunctionCall for Library data
2013-07-15 18:55:40 +02:00
Daniel Marjamäki
66d8fa62d1
Library: added init attribute to <alloc>
2013-07-15 08:44:00 +02:00
Daniel Marjamäki
b2f6e9e3eb
library: improved handling of noreturn. The Tokenizer::isScopeNoReturn will now try to use the library to determine if scope is noreturn.
2013-07-14 10:10:11 +02:00
Daniel Marjamäki
8285510996
Rules: Make it possible to write rules that check #define macros
2013-07-12 16:09:00 +02:00
Lucas Manuel Rodriguez
cfd697d6d4
Fixed #4042 (False Positive : Same expression on both sides of '&')
2013-07-11 07:13:47 +02:00
Daniel Marjamäki
8f332af849
Uninitialized variables: Avoid FP when using '?:'
2013-07-10 16:44:35 +02:00
Lucas Manuel Rodriguez
040c1e3a13
Fixed #4906 (False positive: void * calculation (cast))
2013-07-10 06:40:09 +02:00
Daniel Marjamäki
4106972fdc
Merge pull request #148 from JustRamires/master
...
Fixed segmentation fault in SymbolDatabase::SymbolDatabase(Ticket #4892 )
2013-07-09 02:55:46 -07:00
Roman Zaytsev Borisovich
295869a866
Fixed segmentation fault in SymbolDatabase::SymbolDatabase(Ticket #4892 )
2013-07-09 13:10:03 +04:00
Daniel Marjamäki
8ba14edb51
dmake: fixed lib.pri for gui (tinyxml)
2013-07-08 21:56:09 +02:00
Daniel Marjamäki
7d47fd65a2
Renamed --environment to --library. Added --check-library. Renamed Environment to Library
2013-07-08 18:26:18 +02:00
Alexander Mai
b7bb16ea77
Fixed #4897 (callStackToString is not available when using custom message template)
2013-07-08 06:44:25 +02:00
Lucas Manuel Rodriguez
d177c8fd03
Fixed #4824 (False positive: (warning) Member variable 'Foo::m_state' is not initialized in the constructor.)
2013-07-08 06:38:33 +02:00
Daniel Marjamäki
c74b74da0d
Merge pull request #151 from simartin/xcode_build_environment
...
Add environment.h,cpp to XCode project and restore build from XCode.
2013-07-07 08:13:09 -07:00
Simon Martin
60b244af81
Add environment.h,cpp to XCode project and restore build from XCode.
2013-07-07 11:33:25 +02:00
Daniel Marjamäki
2875ee1ecf
astyle formatting
2013-07-07 10:26:20 +02:00
Daniel Marjamäki
2ef0a40aec
Fixed #4893 (FP Uninitialized variable on sizeof of itself)
2013-07-06 08:52:47 +02:00
Lucas Manuel Rodriguez
00886b4d06
Fixed #4876 (Checking for sizeof(void))
2013-07-05 21:07:07 +02:00
Daniel Marjamäki
61e1dd5096
Environment: Refactoring and cleanup
2013-07-05 20:55:31 +02:00
vBm
2ba337faf7
Fix GUI compilation after d96fb577
...
Fixes ticket #4895
Thanks to PKEuS for telling me what to do :-)
2013-07-04 15:31:27 +02:00
PKEuS
14c3b390a4
Fixed version number
2013-07-04 13:32:45 +02:00
PKEuS
6494d9ac7f
Make cppcheck compile with VS again.
2013-07-04 13:09:34 +02:00
Daniel Marjamäki
ef83525cd0
CheckUninitVar: Fixed GCC warning
2013-07-04 07:58:30 +02:00
Roman Zaytsev Borisovich
e37587aed5
Ticket #4801
2013-07-02 15:28:44 +04:00
Daniel Marjamäki
d96fb577cd
CLI: Added --environment flag
2013-07-02 07:18:19 +02:00
Simon Martin
e2deb59f8a
Improved handling of syntax errors in Tokenizer::simplifyAddBracesPair.
2013-06-29 14:05:49 +02:00
Daniel Marjamäki
6b2bab535b
CLI,LIB: Added --std setting for GTK
2013-06-29 12:55:24 +02:00
Daniel Marjamäki
ba23b65179
Fixed #4885 (FP Uninitialized variable when using comma)
2013-06-29 09:33:51 +02:00
Daniel Marjamäki
6997d38881
Uninitialized variables: fixed false positive in while loop
2013-06-27 18:28:00 +02:00
Daniel Marjamäki
6b01d2d5a8
Fixed #4747 (Can not find uninitialized variable (variable used in rhs in assignment))
2013-06-27 16:53:15 +02:00
Daniel Marjamäki
9624a89b34
Uninitialized variables: improved debug warning when bailing out
2013-06-26 20:59:08 +02:00
Daniel Marjamäki
c389e08353
Fixed #4728 (simplify known variables better (%var% & %num%, bitwise and))
2013-06-26 18:13:28 +02:00
Daniel Marjamäki
2265c61734
Fixed #4879 (false positive: uninitialized variable in inner for inside while (regression))
2013-06-26 17:02:57 +02:00
Zachary Blair
a381170886
Fixed #4874 (Minor spelling corrections)
2013-06-26 00:47:02 -07:00
Daniel Marjamäki
7dd07472c1
Fixed #4530 (Tokenizer: improved simplification of strlen in calculation)
2013-06-25 20:10:40 +02:00
Daniel Marjamäki
cfd960d794
Fixed #3765 (false negative: unitialized variable)
2013-06-25 18:40:41 +02:00
Simon Martin
75c8dcc664
Fixed #4873 (Preprocessor: Cppcheck is unable to scan a file with a single quote in a comment inside assembler section)
2013-06-25 06:45:11 +02:00
Lucas Manuel Rodriguez
d6be4559cd
Fixed #4840 (false negative: buffer access out of bounds)
2013-06-25 06:37:51 +02:00
Alexander Mai
5a9975bbdd
Fixed #4869 (segmentation fault in Tokenizer::simplifyStructDecl (invalid code))
2013-06-22 14:05:49 +02:00
Daniel Marjamäki
bfc40ffe9f
Fixed #4868 (Segmentation fault in Preprocessor::handleIncludes())
2013-06-21 20:10:46 +02:00
Daniel Marjamäki
e4270bab78
Fixed #4863 (macros not propagated)
2013-06-19 21:29:39 +02:00
Daniel Marjamäki
a5636d55bc
Preprocessor: Reuse help function that converts string to map
2013-06-19 17:42:55 +02:00
Daniel Marjamäki
2fb8133e90
Fixed #4862 (False positive: Comma is used in return statement (template))
2013-06-18 00:13:45 +02:00
Alexander Mai
0be1892b92
Fixed #4806 (Crash in Type::initBaseInfo() in clang testcode)
2013-06-16 21:46:01 +02:00
Alexander Mai
38ecdda076
Fixed #4859 (Update doxygen support)
2013-06-16 19:25:05 +02:00
Daniel Marjamäki
d3d7808a06
Fixed #4834 (FreeType: incorrect array boundary analysis)
2013-06-16 15:41:13 +02:00
Daniel Marjamäki
210f2ab352
Tokenizer: refactoring; use Token::link() instead of loop
2013-06-16 15:27:59 +02:00
Daniel Marjamäki
59478c15cf
Tokenizer: small speedup
2013-06-16 09:00:02 +02:00
Daniel Marjamäki
a9bd6cf3df
Fixed #4857 (False Positive: function argument hides enumerator of same type)
2013-06-16 08:13:41 +02:00
Daniel Marjamäki
b31c218773
fixed typo, thanks XhmikosR for pointing it out
2013-06-15 19:31:17 +02:00
Abhishek Bharadwaj
d85c8e6782
Fixed #4104 (New check: comma separated statements in return statement from a function)
2013-06-15 17:49:10 +02:00
Daniel Marjamki
03f28e9c65
Fixed #4668 (Tokenizer: improve handling of 'if (x) MACRO() { ..')
2013-06-15 14:40:05 +02:00
Daniel Marjamäki
15c92384f4
Fixed #4851 (Preprocessor: problem when using #ifndef symbol in the code)
2013-06-15 12:08:18 +02:00
Daniel Marjamäki
722bfe7197
Fixed #4553 (Wrong calculation of known values)
2013-06-14 18:51:52 +02:00
Daniel Marjamäki
ae36472a1b
Fixed #4778 (FP: Uninitialized variable: av)
2013-06-14 07:21:53 +02:00
Robert Reif
870d29944b
Fixed #4852 (false positive: Member variable 'A::sz' is not initialized in the constructor)
2013-06-14 06:32:26 +02:00
Daniel Marjamäki
cd5e32446f
Fixed #4641 (False positive: Address of local auto-variable assigned to a function parameter)
2013-06-13 16:19:19 +02:00
PKEuS
876e9c0039
Fixed issue on C++11 right angle brackets ( #4832 )
2013-06-12 13:43:29 -07:00
PKEuS
917acea2ca
Fixed two spelling mistakes found by ettlmartin
2013-06-12 13:13:05 -07:00
Daniel Marjamäki
75616786ef
Fixed #4848 (--include not working since the last 2 days)
2013-06-12 16:59:25 +02:00
Daniel Marjamäki
c4763b9010
Fixed #4463 (false positive: (style) Variable 'CHDERR_NOT_OPEN' hides enumerator with same name)
2013-06-12 06:45:26 +02:00
Daniel Marjamäki
47931372ff
astyle formatting
2013-06-12 06:43:52 +02:00
Zachary Blair
9c45e6d47d
Fixed #4173 : Elaborated on the verbose error message
2013-06-10 23:11:44 -07:00
PKEuS
4efccc2c5d
Fixed #4420 : Prefix increment is only suspicious, if its return value is not used.
2013-06-10 13:02:02 -07:00
Zachary Blair
28c0045f36
Fixed #4173 : New check: arithmetical usage of inf/nan result
2013-06-09 23:13:08 -07:00
Daniel Marjamäki
6900d4fb76
Travis: Fixed cppcheck style warning
2013-06-09 20:17:26 +02:00
Daniel Marjamäki
66f9e9b16f
Rules: Allow that 'raw' tokens are checked.
2013-06-09 15:50:43 +02:00
Daniel Marjamäki
537166cf47
Rules: Make it possible run a rule on the 'normal' token list
2013-06-09 14:58:56 +02:00
Daniel Marjamäki
616a693f1f
Merge pull request #139 from JustRamires/master
...
Ticket #4694
2013-06-08 07:46:08 -07:00
Daniel Marjamki
4e09b06bc1
Fixed #4827 (allow checking multiple configurations when using -D by also using --max-configs or --force)
2013-06-08 16:46:54 +02:00
Roman Zaytsev Borisovich
4610b135dc
Fixed #4694
2013-06-07 10:37:33 +04:00
Daniel Marjamäki
10849e220b
Fixed #4809 (Review CheckNullPointer::parseFunctionCall)
2013-06-07 06:37:53 +02:00
Daniel Marjamäki
9eac4489ac
Fixed #4838 (False positive for ... seems to be invalid)
2013-06-06 12:44:19 +02:00
Frank Zingsheim
aa25d1e0af
Fixed #4837 (False positive: Assert statement calls a function which may have desired side effects (local variable))
2013-06-05 22:10:43 +02:00
Daniel Marjamäki
dec520c507
Tokenizer::simplifyEnum: Fixed false positives
2013-06-04 21:18:20 +02:00
Daniel Marjamäki
8b5792a0f8
Tokenizer::simplifyEnum: Fixed internalErrors when building with compiled patterns.
2013-06-04 18:57:46 +02:00
Daniel Marjamäki
fa1fd31667
Tokenizer::simplifyEnum: Improved handling of shadow variables
2013-06-04 06:51:01 +02:00
Daniel Marjamäki
8954cc0984
Fixed #4280 (Tokenizer::simplifyEnum: don't simplify shadow variables)
2013-06-03 19:18:51 +02:00
Daniel Marjamäki
e90a3c179f
doc: minor tweaks of --doc output
2013-06-03 06:36:37 +02:00
PKEuS
ffb5317c61
Set version to 1.61 dev
2013-06-02 15:40:51 +02:00
Daniel Marjamki
c83bd7f00f
1.60.1: Set versions
2013-06-02 13:13:40 +02:00
Daniel Marjamäki
d36d3d5469
1.60: set version
2013-06-01 15:17:07 +02:00
Daniel Marjamäki
e3dd51dd2b
Fixed Cppcheck warning. Method TokenList::createAst can be const
2013-06-01 15:04:37 +02:00
Daniel Marjamäki
ca632bd771
Fixed Cppcheck warning. Made method const
2013-06-01 14:35:21 +02:00
Daniel Marjamäki
785d54046f
Fixed Cppcheck warning, method can be static
2013-06-01 14:06:48 +02:00
Daniel Marjamäki
a7da65a40b
Fixed #4618 (Unmatched suppression: don't show this information message unless --enable=information or --check-cfg is used)
2013-05-31 15:20:58 +02:00
Daniel Marjamäki
065853a59a
Fixed #4652 (False positive: variable value tracking into loop body)
2013-05-29 16:16:12 +02:00
Daniel Marjamäki
a861817a01
Fixed #4751 (CheckBufferOverrun: better handling when struct member instance doesn't have same varid as struct member declaration)
2013-05-28 16:52:23 +02:00
Daniel Marjamäki
ae7363fe54
Fixed #4599 (False positive with fopen/fclose test)
2013-05-23 06:34:22 +02:00
Frank Zingsheim
614a78084f
Fixed #4799 : Improved quickfix from 0943fecf03
...
(Segmentation fault in K&R simplification inside lambda expression)
2013-05-21 19:43:07 +02:00
Daniel Marjamäki
c795f6e2f7
CheckOther::checkSuspiciousEqualityComparison: check if --inconclusive has been used since the message is inconclusive
2013-05-20 16:05:21 +02:00
Robert Reif
2c8360c607
Fixed #4789 (uninitMemberVar not found when constructor contains default parameters)
2013-05-18 18:33:24 +02:00
Daniel Marjamäki
1476787f40
CheckClass: Fixed nullpointer check and then dereference warning.
2013-05-17 14:10:53 +02:00
Daniel Marjamäki
4d781a7492
made CheckAssert::inSameScope static to silence cppcheck warning
2013-05-15 16:51:15 +02:00
Daniel Marjamäki
18116ab61e
CheckAssert: Fixed 'NULL pointer check and dereference code'
2013-05-15 16:40:50 +02:00
Daniel Marjamäki
b84547a312
Fixed #4798 (Token::Match(tok, '&|*|%var%') behaves differently when parsed or compiled)
2013-05-15 13:22:25 +02:00
Frank Zingsheim
0943fecf03
Fixed #4799 (Segmentation fault in K&R simplification inside lambda expression)
2013-05-14 20:56:31 +02:00
PKEuS
b58e1241dc
Distinguish between different swprintf overloads. ( #4790 )
...
Fixed MSVC warning recently introduced
2013-05-14 02:06:16 -07:00
PKEuS
1903585ea3
Fixed bug in handling rvalue references: Scope has to be set everywhere. ( #4732 )
2013-05-14 01:43:32 -07:00
Frank Zingsheim
0076ebe08d
More general fix to #4187 (False positive: Variable inside a lambda is reported as uninitialized)
...
Travis: Problems with matchcompiler.py
2013-05-12 11:19:10 +02:00
Frank Zingsheim
511f8a4c1f
More general fix to #4187 (False positive: Variable inside a lambda is reported as uninitialized)
2013-05-12 10:19:43 +02:00
Frank Zingsheim
d387e8b770
Fixed #4711 : (false positive: Consecutive return...)
2013-05-11 17:50:59 +02:00
Daniel Marjamäki
2f1050595d
CppCheck: Added _simplify flag that can be used by clients to disable simplifications
2013-05-11 11:35:04 +02:00
Daniel Marjamäki
b6bcdf2936
Fixed #4520 (segmentation fault of cppcheck (preprocessing))
2013-05-09 18:50:24 +02:00
PKEuS
fb480ebb0a
Now really fixed #4604 .
2013-05-09 15:39:33 +02:00
PKEuS
881b47e79d
Revert "Improved handling of 0 initializations ( #4604 )"
...
This reverts commit 1201e417ec
.
2013-05-09 15:32:02 +02:00
PKEuS
0a104c40b7
Fixed "Improved handling of 0 initializations ( #4604 )"
...
This fixes commit 1201e417ec
.
2013-05-09 15:25:36 +02:00
PKEuS
982b9491d4
Improved handling of 0 initializations ( #4604 )
2013-05-09 06:23:25 -07:00
PKEuS
c42b89fb88
Revert "Improved handling of 0 initializations ( #4604 )"
...
This reverts commit 1201e417ec
.
2013-05-09 15:19:23 +02:00
PKEuS
1201e417ec
Improved handling of 0 initializations ( #4604 )
2013-05-09 06:17:10 -07:00
Daniel Marjamäki
cbe0a0825c
Fixed #4725 (Tokenizer: Replace block declaration (^{}) with asm())
2013-05-09 14:47:18 +02:00
Daniel Marjamäki
455b07a641
CheckAssert: Fixed shadow variable warning
2013-05-09 06:29:12 +02:00
Lena Herscheid
e23038c4de
Fixed #4775 (Check for assert() with side effects)
2013-05-07 21:35:16 +02:00
Daniel Marjamäki
67979f00be
ErrorLogger: Make sure Token class is known
2013-05-07 18:18:15 +02:00
Frank Zingsheim
bca751b9f4
Fixed #4773 (Regression: wrong detection of unitialized variable)
2013-05-06 18:45:00 +02:00
Daniel Marjamäki
4659745106
Fixed #4786 (segfault with one LibreOffice file)
2013-05-06 16:56:34 +02:00
Daniel Marjamäki
3f5a858800
dmake: update Makefile
2013-05-05 09:22:04 +02:00
Daniel Marjamäki
ea60c5b14b
CheckBufferOverrun: Code cleanup
2013-05-05 08:14:19 +02:00
Daniel Marjamäki
079d22fbee
Fixed #4734 (False 'Possible null pointer dereference')
2013-05-03 16:18:44 +02:00
Zachary Blair
de8ee5b042
Fixed #4554 (false negative: buffer access out of bounds)
2013-05-02 21:50:48 -07:00
Daniel Marjamäki
bfb1bc50e3
Fixed #4760 (false negative: (error) usage of uninitialized variable (struct member))
2013-05-02 20:34:15 +02:00
Daniel Marjamäki
44cb070e13
Fixed #4737 (False positive: Uninitialized variable 'do_something(&((char*)&var)[0],1);')
2013-05-01 13:52:28 +02:00
Frank Zingsheim
42068a3d60
Fixed #4767 (segmentation fault in expand template)
2013-05-01 13:28:01 +02:00
Daniel Marjamäki
287782a679
Fixed #4390 (False alarm 'Object pointed by an auto_ptr is destroyed using operator delete. You should not use auto_ptr for pointers obtained with operator new[].')
2013-05-01 11:11:57 +02:00
Daniel Marjamäki
b2798e929d
Improved fix for #4455 , no false negatives if variable is used before first memset
2013-04-30 16:56:44 +02:00
Daniel Marjamäki
cf75e2bb28
astyle formatting
2013-04-30 06:44:50 +02:00
Daniel Marjamäki
47ef8cf455
Fixed #4455 (redundantCopy when precleaning with memset)
2013-04-30 06:43:16 +02:00
Zachary Blair
1f97e0e5df
Ticket #4510 - Reduced the scope of the safeFunctions variable to avoid a cppcheck style issue
2013-04-26 20:06:17 -07:00