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