Oliver Stöneberg
98335e5d5f
moved more tests from Travis to GitHub actions ( #3201 )
2021-04-09 07:47:11 +02:00
Paul Fultz II
5cf2f7e633
Fix issue 10087: false positive: error: Reference to temporary returned. ( #3205 )
2021-04-09 07:44:20 +02:00
Paul Fultz II
255f273c46
Fix issue 10088: ValueFlow: Array size, wrong known value ( #3204 )
2021-04-09 07:43:54 +02:00
ericmalenfant
1e9687aa8b
Fix noCopyConstructor with multiple inheritance ( #3203 )
2021-04-09 07:41:59 +02:00
Paul Fultz II
f8dc9862da
Fix issue 10202: FP: constParameter ( #3202 )
2021-04-08 16:02:11 +02:00
Daniel Marjamäki
c8e661f61f
assignmentInCondition: Clarify error message
2021-04-07 19:46:00 +02:00
Daniel Marjamäki
72802554c9
Fixed #3593 (New Check: Check for assignment within conditional expression)
2021-04-07 17:21:34 +02:00
Daniel Marjamäki
21b1987b55
Manual; Add chapter about cppcheck build dir. Formatting tweaks.
2021-04-07 15:32:21 +02:00
orbitcowboy
e60d79e2c9
wxwidgets.cfg: Added tests for commit ccb2cb26b2
2021-04-07 07:57:27 +02:00
Steve Browne
ccb2cb26b2
Remove incorrect use-retvals ( #3200 )
...
These functions return a self ref and are not const so you shouldn't need to use the return value.
2021-04-07 07:52:26 +02:00
Daniel Marjamäki
73e698b84d
Fixed #9214 (Tests are run on simplified token list)
2021-04-06 21:21:53 +02:00
Daniel Marjamäki
487965eb67
AUTHORS; Added fschwa
2021-04-06 19:42:29 +02:00
fschwa
806dbf77b6
use size() instead of hard-coded length value ( #3199 )
...
Co-authored-by: Frederik Schwarzer <frederik.schwarzer@smart-battery-solutions.de>
2021-04-06 16:57:27 +02:00
Paul Fultz II
e0f9627201
Fix issue 10226: FP: redundant condition or invalid iterator ( #3195 )
2021-04-06 11:04:37 +02:00
Daniel Marjamäki
93873be81a
Cppcheck CLI; Better filtering of duplicate XML results when no -j is used
2021-04-05 20:09:45 +02:00
Daniel Marjamäki
93f46f6e7b
Fix testrunner after file0 tweaks
2021-04-05 13:11:23 +02:00
Daniel Marjamäki
161ea81fd8
XML: Ensure file0 info is kept in multithreaded analysis. Write file0 attribute in top <error> element instead of in the <location> elements.
2021-04-05 12:03:39 +02:00
Paul Fultz II
e65ea8575f
Fix issue 10207: FP: derefInvalidIteratorRedundantCheck with ternary operator ( #3197 )
2021-04-05 11:10:43 +02:00
Paul Fultz II
f605f71e49
Fix issue 10225: false positive: knownConditionTrueFalse ( #3196 )
2021-04-05 10:20:14 +02:00
Yichen
8034a70bd3
Check for libc++ instead of clang to workaround a libc++ bug. ( #3194 )
2021-04-05 05:24:46 +02:00
Daniel Marjamäki
de2e836727
test/cfg/windows.cpp; Uncommented TODO, Cppcheck now writes a warning as it should about unused function return value
2021-04-05 05:20:42 +02:00
Daniel Marjamäki
bc05ee62d5
CheckFunctions::checkIgnoredReturnValue; Fixed testrunner
2021-04-05 05:17:29 +02:00
Daniel Marjamäki
cf8a423636
Unreachable code; better handling of throw in C code
2021-04-05 04:53:07 +02:00
Daniel Marjamäki
a21c81365d
one definition rule: Fixed false positive for 'class A::B ..'
2021-04-04 21:29:45 +02:00
Daniel Marjamäki
084bc74080
Fixed #8223 (false negative: Statements following return, break, continue, goto or throw will never be executed.)
2021-04-04 19:43:51 +02:00
Daniel Marjamäki
518fb01553
Fixed #8412 (ignoredReturnValue not issued when return value is changed but not really used (by logical not for example))
2021-04-04 18:26:07 +02:00
Daniel Marjamäki
44f914eaee
astyle formatting
...
ci skip
2021-04-04 18:20:32 +02:00
Oliver Stöneberg
6397e29f84
cleaned up includes based on include-what-you-use ( #3141 )
2021-04-03 21:30:50 +02:00
Oliver Stöneberg
d11f0f3f18
use all available processes for nmake builds ( #3192 )
2021-04-03 21:28:17 +02:00
Oliver Stöneberg
052de79b6d
some test/CI related refactoring and cleanup ( #3163 )
2021-04-03 21:22:39 +02:00
Oliver Stöneberg
c45b941717
CI-windows.yml: fixed building of GUI broken by incorrect matrix checks ( #3193 )
2021-04-03 21:10:59 +02:00
Daniel Marjamäki
9ce0235e8e
std.cfg: Fixed configuration of mbstowcs
2021-04-03 10:42:24 +02:00
Daniel Marjamäki
e09e393503
std.cfg: Tweaked std::distance return type, result can be negative.
2021-04-03 08:48:58 +02:00
Oliver Stöneberg
4d526dcbf7
extended the Python script checks in the CI and adjusted some scripts ( #3186 )
2021-03-31 22:09:42 +02:00
Paul Fultz II
182ae75290
Fix issue 10216: FP containerOutOfBounds with std::array initialized with = {} ( #3190 )
2021-03-31 22:07:54 +02:00
Oliver Stöneberg
9b974f1b8e
fixed Visual Studio warnings about shadowed members ( #3191 )
2021-03-31 22:07:20 +02:00
Daniel Marjamäki
ede372c4f8
AUTHORS: Added 3v1n0
2021-03-31 18:16:29 +02:00
Marco Trevisan
4a286dfade
gtk: Mark g_thread_join as a dealloc for g_thread_new ( #3188 )
...
g_thread_join() consumes the reference to the passed-in thread .
This will usually cause the GThread struct and associated resources to be freed.
2021-03-31 18:15:25 +02:00
Paul Fultz II
5077663684
Fix issue 9979: false positive: containerOutOfBounds with conditional resize ( #3136 )
2021-03-30 14:02:28 +02:00
DGarry82
5c102a0b8a
try to find pcre.h for HAVE_RULES in any case ( #3185 )
2021-03-30 13:37:26 +02:00
Paul Fultz II
9de976b243
Fix issue 10194: hang with followAllReferences() ( #3189 )
...
* Decrease depth faster when there is multiple returns
2021-03-30 11:22:56 +02:00
DGarry82
77716ee398
fix w64-mingw32-ld linking error ( #3184 )
...
* fix w64-mingw32-ld linking error
use shlwapi instead of Shlwapi.lib in mingw-w64 build environment
(prevents "/usr/bin/x86_64-w64-mingw32-ld: cannot find -lShlwapi" error)
* same MinGW shlwapi fix for {tests,tools}/CMakeLists.txt
Co-authored-by: Igor Rondarev <igor.rondarev@gmail.com>
2021-03-29 17:04:42 +02:00
Ken-Patrick Lehrmann
cddaa6d671
10221: Fix setVarId in template code ( #3187 )
...
The computation of the classname was not expecting templates. Simply
skipping the template part seems to fix the issue.
2021-03-29 12:16:02 +02:00
orbitcowboy
e23a967215
#4750 Added a regression test
2021-03-28 09:29:46 +02:00
orbitcowboy
185a5e1ee6
#7682 Added regression test
2021-03-26 10:54:08 +01:00
orbitcowboy
6fd916a90f
#3763 Added regression test
2021-03-26 10:01:44 +01:00
Lars Even Almaas
9786f1c34b
Suggested implementation for rule 8.2 ( #3169 )
2021-03-25 08:25:43 +01:00
fu7mu4
e6e0cb773f
Add Japanese translation for 2.4.1 ( #3182 )
2021-03-23 18:13:47 +01:00
Georgiy Komarov
3f633d3b21
win_installer: Add misra_9.py ( #3180 )
2021-03-22 18:57:28 +01:00
Tomasz Kłoczko
8d6828847b
Another gcc11 fix ( #3179 )
...
/home/tkloczko/rpmbuild/BUILD/cppcheck-2.4/lib/symboldatabase.cpp: In member function ‘void SymbolDatabase::createSymbolDatabaseExprIds()’:
/home/tkloczko/rpmbuild/BUILD/cppcheck-2.4/lib/symboldatabase.cpp:1443:32: error: ‘numeric_limits’ is not a member of ‘std’
1443 | if (id == std::numeric_limits<nonneg int>::max()) {
| ^~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/cppcheck-2.4/lib/symboldatabase.cpp:1443:54: error: expected primary-expression before ‘int’
1443 | if (id == std::numeric_limits<nonneg int>::max()) {
| ^~~
/home/tkloczko/rpmbuild/BUILD/cppcheck-2.4/lib/symboldatabase.cpp:1443:47: error: expected ‘)’ before ‘int’
1443 | if (id == std::numeric_limits<nonneg int>::max()) {
| ~ ^ ~~~
| )
This patch adds missing `include #include <limits>`
Co-authored-by: Your Name <you@example.com>
2021-03-22 18:43:08 +01:00