Daniel Marjamäki
dce942197c
Fixed #8186 (Inner condition always false inside for loop)
2017-08-31 16:00:12 +02:00
Dmitry-Me
d598a1c278
Fix typo causing two expressions being identical
2017-08-30 22:43:54 +03:00
Daniel Marjamäki
82527422a8
Fixed #5614 (Incorrect syntax error with function pointer typedef and dependent template types)
2017-08-30 19:18:05 +02:00
Daniel Marjamäki
59034e17f1
Refactoring, reuse code to skip lambda functions
2017-08-29 22:35:55 +02:00
Daniel Marjamäki
9c99bc43c2
ValueFlow: Skip wrong handling of lambda functions. TODO: handle lambda functions properly.
2017-08-28 22:39:12 +02:00
Dmitry-Me
017e72d145
Read attribute once, better variable name
2017-08-28 19:11:04 +03:00
Dmitry-Me
7bd3dc5da6
Simplify array access with references
2017-08-28 18:19:03 +03:00
Dmitry-Me
7d19d1ea2e
Better use of temporary
2017-08-28 18:15:15 +03:00
Dmitry-Me
cf6d3ba398
Omit unneeded computations
2017-08-28 18:10:49 +03:00
Daniel Marjamäki
02a1b7cd2d
Fixed #7965 (valueFlowForward: Improved handling of correlated variables)
2017-08-27 19:50:44 +02:00
Daniel Marjamäki
713f607168
Fixed #8156 (wrong ast for 'z = (x & (unsigned)1) | (y & (unsigned)2);')
2017-08-26 23:25:45 +02:00
Daniel Marjamäki
e74e4c6934
Fixed #8030 (False positive 'constStatement' when indexing with {})
2017-08-26 11:59:09 +02:00
Dmitry-Me
cc97834e88
Revert "Combine overlapping patterns"
...
This reverts commit 123f9b67e0
.
2017-08-26 08:18:24 +03:00
Dmitry-Me
123f9b67e0
Combine overlapping patterns
2017-08-26 07:32:02 +03:00
Dmitry-Me
b9c2a996bf
Break loop early
2017-08-26 07:26:28 +03:00
Daniel Marjamäki
46c6620691
Token::takeData: dont keep old values or valuetype
2017-08-25 23:32:26 +02:00
Daniel Marjamäki
ea0db18e0c
Refactor Token::deleteThis()
2017-08-25 23:30:04 +02:00
Daniel Marjamäki
529b255e99
ValueFlow: Better errorpath for increment/decrement
2017-08-25 23:07:26 +02:00
Daniel Marjamäki
b1b8e5270a
ValueFlow: Better errorpath for increment/decrement
2017-08-25 22:15:52 +02:00
Heiko Eißfeldt
bab2b26d10
Fixed #8154 (heap use after free in tokenlist)
2017-08-25 17:17:19 +02:00
Daniel Marjamäki
50636f75ba
ValueFlow: Improved error path for compound assignments
2017-08-24 22:02:49 +02:00
Dmitry-Me
61e290750e
Read attribute once, better variable name
2017-08-24 18:28:52 +03:00
Dmitry-Me
3bcfc33014
Break loop early
2017-08-24 18:26:53 +03:00
Dmitry-Me
45996b1404
Simplify code, read attribute once
2017-08-24 18:23:44 +03:00
Dmitry-Me
eba9ea0ed0
Remove redundant check
2017-08-24 18:11:54 +03:00
Dmitry-Me
2582bbd0f6
Break loop early
2017-08-24 18:10:33 +03:00
Daniel Marjamäki
d160d27417
Fixed #8172 (False positive uninitvar on sizeof *ptr)
2017-08-23 22:17:49 +02:00
Daniel Marjamäki
f10634c021
ValueFlow: Dont try to evaluate '/=0;'
2017-08-23 17:53:05 +02:00
Dmitry-Me
7fba6ecef1
Remove and disallow unused copy constructor
2017-08-23 17:54:20 +03:00
Daniel Marjamäki
167cfb1ac5
valueFlowForward: improve handling of compound assignments
2017-08-23 11:13:47 +02:00
Daniel Marjamäki
71b0370389
Fixed #1793 (CheckType::checkFloatToIntegerOverflow: assignments)
2017-08-23 05:34:47 +02:00
Daniel Marjamäki
b7f9e7ed1d
negativeContainerIndex: avoid crash when AST is wrong
2017-08-22 12:30:43 +02:00
Daniel Marjamäki
2679b576c2
Fixed #1693 (false negative: std::vector, negative index)
2017-08-22 11:04:02 +02:00
Alexander Mai
0cae823c5d
Fix doxygen comments
2017-08-21 21:13:01 +02:00
Daniel Marjamäki
e087156e30
CheckUninitVar: Try to activate the valueflow based checking again
2017-08-20 19:54:06 +02:00
Daniel Marjamäki
3abb62a6d1
Fixed #8036 (valueFlowUninit: strcpy(buf, e = str), free(e);)
2017-08-20 19:47:26 +02:00
Daniel Marjamäki
92e9744020
Fixed #8148 (Tokenizer: Braces are not added properly in do while)
2017-08-16 18:55:34 +02:00
Dmitry-Me
2a4f68ccf8
Resolve CID 1365361
...
* work around possible null pointer dereference in case of missing attributes
2017-08-16 17:53:04 +03:00
Martin Güthle
1d491bd332
Treat noexcept correctly
...
Converts the noexcept to the already correctly handled noexcept(true)
2017-08-16 11:31:19 +02:00
Daniel Marjamäki
5c733c8f22
Fixed #8152 (Garbage code cause crash '0|\0|0>;')
2017-08-15 23:19:42 +02:00
Hinterwaeldlers
705e5e3468
Fix for http://trac.cppcheck.net/ticket/8151 ( #942 )
...
* Taking care of incorrect template syntax (missing close)
Forward the incorrectness via throw, as there is no direct access to the
syntaxError method, without converting the function to a member function
2017-08-15 22:40:55 +02:00
Dmitry-Me
6303437163
Resolve C4800
2017-08-15 17:42:56 +03:00
Dmitry-Me
d3d9c76f01
Fix off by one, resolve C4334
2017-08-14 18:07:36 +03:00
Dmitry-Me
b995e59ff2
No need for counting here
2017-08-14 18:06:23 +03:00
Daniel Marjamäki
ca6109b40c
threadsafety: Fix static data in Token::values()
2017-08-13 14:15:24 +02:00
Daniel Marjamäki
fb37f3503a
Fix GCC compiler warning about missing enum constant PlatformFile in switch
2017-08-12 00:17:55 +02:00
Dmitry-Me
45032f7d3b
Use std mechanism to detect signedness
2017-08-11 18:44:14 +03:00
Gennady Feldman
1c71c789d6
Stop parsing a define with value at the '='. ( #937 )
2017-08-09 20:02:25 +02:00
Ayaz Salikhov
b8cd7dbb5c
Use nullptr instead of 0 or NULL ( #936 )
2017-08-09 20:00:26 +02:00
orbitcowboy
61e47208eb
Removed hard coded avr8 platform and moved it into a platform file (avr8.xml).
2017-08-09 11:58:27 +02:00
Daniel Marjamäki
7a9d4b820f
Fixed #8158 (Custom platform configuration seems to be not used)
2017-08-09 11:06:31 +02:00
Daniel Marjamäki
c0890b5255
ImportProject: Improve cppcheckDefines()
2017-08-08 22:57:11 +02:00
Daniel Marjamäki
9861240e79
ImportProject: Only expose Cppcheck Visual Studio defines for Cppcheck
2017-08-08 22:27:08 +02:00
Nekto89
729af993fe
Fix absolute pathes import from vcxproj ( #934 )
...
Fixed importing vcxproj that contains files with absolute pathes.
2017-08-07 23:51:12 +02:00
Daniel Marjamäki
5fa7a4edc4
GUI: save dumpfiles in buildDir if possible
2017-08-03 22:54:38 +02:00
Daniel Marjamäki
53002e40f6
Fix ImportProject
2017-08-03 20:38:24 +02:00
Daniel Marjamäki
ccea0b17b3
ImportProject: Read system includes and standard from compile database
2017-08-03 20:33:56 +02:00
Daniel Marjamäki
61eccd7070
Fix dump
2017-08-03 18:03:59 +02:00
Daniel Marjamäki
4eb43a5557
Fixed some recent regression in ImportProject for vcxproj projects
2017-08-02 22:51:22 +02:00
Veli-Matti Visuri
da3846f752
Add Timer copy constructor ( #932 )
...
- Satisfy the rule of three
2017-08-02 22:34:28 +02:00
amai2012
39955973e9
Merge pull request #931 from IOBYTE/master
...
Fixed #8142 (false positive: The class 'B' has 'copy constructor' but lack of 'operator='
2017-08-02 21:16:29 +02:00
Daniel Marjamäki
f7514fcd2c
Fix issue detected by Coverity, dereference tok3 and then check if its null.
2017-08-02 08:38:36 +02:00
Daniel Marjamäki
e977cea04c
Fix issue detected by Coverity, either null pointer check is useless or there is null pointer dereference
2017-08-02 08:24:16 +02:00
Daniel Marjamäki
32422c815b
Fix issue found by Coverity, scope cant be null since scope is dereferenced on all paths before the while and also unconditionally inside while
2017-08-02 08:17:29 +02:00
Daniel Marjamäki
462ae455c8
Fix issue detected by Coverity, missing check if _settings is null
2017-08-02 08:04:35 +02:00
Daniel Marjamäki
60f819dbe7
Refactoring, use continue in loop
2017-08-02 08:00:52 +02:00
Daniel Marjamäki
5abf39503a
Fix issue detected by Coverity, in case solution does not specify platform configuration the platform will be uninitialized
2017-08-02 07:59:25 +02:00
Daniel Marjamäki
05cdda3f4c
Fix issue detected by Coverity, XMLElement::Attribute might return null
2017-08-02 07:56:22 +02:00
Daniel Marjamäki
55aec0ef1b
Fix issue detected by Coverity, vt2 is null checked and then dereferenced
2017-08-02 07:48:11 +02:00
Robert Reif
f5044bb65f
Fixed #8142 (false positive: The class 'B' has 'copy constructor' but lack of 'operator='.)
...
Do not count static member variables when trying to figure out if
'operator =' is needed.
2017-08-01 19:52:41 -04:00
Matthias Krüger
9b6d371762
checkbufferoverrun: remove dead store
...
the variable was declared inside a loop and the dead store also took place inside the loop (guarded by a condition) without further access of the value after that store.
Found by clang analyzer.
Was:
lib/checkbufferoverrun.cpp:1223:17: warning: Value stored to 'tok' is never read
tok = tok->next();
^ ~~~~~~~~~~~
2017-08-01 16:53:00 +02:00
Daniel Marjamäki
9ef9d0e4a8
Fixed #8128 (False negative: variable is assigned value that is not read)
2017-08-01 14:56:53 +02:00
Daniel Marjamäki
1758c3b4e7
Fix suspicious code found by Coverity, dont check if scope->function is null and then dereference it
2017-08-01 13:26:35 +02:00
Daniel Marjamäki
058c439b2a
Coverity detected useless function call, cleanup code
2017-08-01 12:45:37 +02:00
Daniel Marjamäki
0c8a899f59
Fix issue detected by Coverity, there was dead code because the wrong variable was used in condition
2017-08-01 11:45:51 +02:00
Daniel Marjamäki
be998773ee
Minor refactoring, fixes FP from Coverity
2017-08-01 11:33:24 +02:00
Daniel Marjamäki
6cc7f46696
Fix issue detected by Coverity, ternary condition is always true
2017-08-01 11:25:28 +02:00
Daniel Marjamäki
267a2e154d
Fixed #8127 (cppcheck 1.80 compilation by MINGW32 gcc 6.3 failed)
2017-07-31 18:30:20 +02:00
Daniel Marjamäki
cdeae918a8
Fix issue detected by Coverity (ternary operator false expression is unreachable)
2017-07-31 17:58:07 +02:00
Daniel Marjamäki
a024f339dd
Fix issue detected by Coverity (ternary operator false expression is unreachable)
2017-07-31 17:55:15 +02:00
Daniel Marjamäki
fec0c46af0
Refactoring, use continue in loop
2017-07-30 14:53:58 +02:00
Daniel Marjamäki
29265cdd49
Refactoring, use continue
2017-07-30 12:46:04 +02:00
PKEuS
9558877458
Set version to 1.80.99/1.81 dev
2017-07-30 08:48:47 +02:00
Daniel Marjamäki
f76ff9e7bf
Tokenizer: Put struct in anonymous namespace
2017-07-29 19:46:18 +02:00
Daniel Marjamäki
91eb0f1fad
Removed XML version 1
2017-07-29 18:56:22 +02:00
Daniel Marjamäki
baedfa6718
1.80: Set versions
2017-07-29 12:55:53 +02:00
Daniel Marjamäki
a78fd23732
Refactoring, skipEnumBody
2017-07-29 12:13:32 +02:00
Daniel Marjamäki
abf525e46d
Fix Cppcheck warning
2017-07-29 11:58:00 +02:00
Simon Martin
aa35462add
Ticket #8091 : Don't replace std types within enum definitions. ( #922 )
2017-07-29 11:56:09 +02:00
Daniel Marjamäki
01f023dc0a
CheckClass: Refactor hasAssignSelf to use AST
2017-07-28 23:49:11 +02:00
orbitcowboy
0e575ce12c
Modernize: make use of 'nullptr' and added a rule-file for finding non-nullptr (zero) initializations.
2017-07-28 15:20:43 +02:00
Daniel Marjamäki
c4bd70210c
GUI: Rename methods in FileList and PathMatch
2017-07-28 10:55:51 +02:00
Daniel Marjamäki
a4dd8f0aa4
modernize, use nullptr
2017-07-27 18:36:33 +02:00
Daniel Marjamäki
5ae962194d
revert mode change for lib/checkstl.cpp
2017-07-26 23:51:30 +02:00
Daniel Marjamäki
27af3edc5b
CheckStl: Safer use of AST
2017-07-26 23:43:39 +02:00
Daniel Marjamäki
eb288ec2a1
CheckStl: Use AST to handle iterator comparisons better
2017-07-26 23:13:01 +02:00
Daniel Marjamäki
a3916c501c
Refactor loop, use continue
2017-07-26 22:03:55 +02:00
Daniel Marjamäki
da26ef0650
Refactoring: Use continue in loop
2017-07-26 21:13:49 +02:00
Daniel Marjamäki
32940c023a
Refactoring: Use continue in loop
2017-07-26 20:32:14 +02:00
Daniel Marjamäki
2d4f64027a
Refactoring: Use continue in loop
2017-07-26 20:29:13 +02:00