Oliver Stöneberg
2502897265
avoid some redundant and unused settings in tests among other cleanups / added and used `WARN_UNUSED` attribute ( #5284 )
2023-08-09 12:43:55 +02:00
Maksim Derbasov
8166bfc7b8
Do not crash on GUI shutdown ( #5288 )
...
Seems current code for worker threads termination is too brutal which
leads to crash on termination:
```
QThread::start: Thread termination error: No such process
Segmentation fault (core dumped)
```
Seems better to use `quit()` and `wait()`, like in an example:
https://doc.qt.io/qt-6/qthread.html#details
tested: Ubuntu Linux 20
2023-08-09 10:26:46 +02:00
Paul Fultz II
037bed5b3c
testrunner: fix clang compile error related to `dinit` ( #5297 )
...
This fixes the compile error introduced in 5d201c4
.
2023-08-08 23:55:07 +02:00
Oliver Stöneberg
f1749ab7ad
CppcheckExecutor: use dedicated ErrorLogger for printing error messages XML ( #4985 )
...
This starts to untangle the `ErrorLogger` implementation in
`CppcheckExecutor` which handles three different cases and makes things
unnecessarily complicated.
2023-08-08 22:58:02 +02:00
chrchr-github
5ea1bca99f
Fix argument direction in windows.cfg, missing Qt macros ( #5302 )
2023-08-08 22:55:55 +02:00
chrchr-github
c3d7c91e88
Additional call to setValueTypeInTokenList() ( #5300 )
2023-08-08 22:54:27 +02:00
chrchr-github
47c9a941a0
Restore references ( #5303 )
2023-08-08 17:50:08 +02:00
Samuel Poláček
09962a6bcf
Edit verbose warning message for uninitVarError ( #5301 )
...
I think that context needs to be provided as to why it is an issue that
a variable is not initialized.
2023-08-08 15:11:39 +02:00
chrchr-github
eee1221738
Use in-class initializers, default constructors, class -> struct ( #4842 )
2023-08-08 11:05:02 +02:00
chrchr-github
838b6b86e3
Fix #11862 FN constParameterPointer with increment ( #5291 )
2023-08-08 10:38:03 +02:00
chrchr-github
610777d586
Set enum ValueType for :: ( #5298 )
2023-08-07 21:40:33 +02:00
Oliver Stöneberg
072212e708
added `TestCheck` and moved some tests from `TestCppcheck` ( #5289 )
2023-08-07 20:49:10 +02:00
Oliver Stöneberg
988edd24c2
TestSingleExecutor: test clang-tidy invocation ( #5294 )
2023-08-07 20:47:24 +02:00
Oliver Stöneberg
dcdf67a694
some `-Wdouble-promotion` Clang compiler warnings ( #4820 )
2023-08-07 20:44:25 +02:00
Oliver Stöneberg
cc592a6927
CppCheckExecutor: improved library loading error handling a bit ( #5275 )
2023-08-07 19:48:11 +02:00
Oliver Stöneberg
e38a031ae6
ValueFlow: pass `SymbolDatabase` by reference into `ValueFlow::setValues()` ( #5295 )
2023-08-07 18:41:50 +02:00
Oliver Stöneberg
a17f6e89d1
pass `Suppressions` separately from `const Settings` into executors ( #5278 )
2023-08-07 18:39:57 +02:00
Samuel Poláček
de8b4150a8
Explicitly state that --verbose and --quiet can be used at the same time ( #5259 )
...
Just a little clarification.
2023-08-05 19:18:10 +02:00
chrchr-github
73251544a4
Fix #11842 FN constParameterPointer with library function ( #5257 )
2023-08-05 18:48:43 +02:00
Oliver Stöneberg
77c479a6c4
pass `TokenList` as reference into `ValueFlow::setValues()` ( #4868 )
...
This avoid lots of unchecked pointer dereferences.
There was a single case which checked it and that looked like a
leftover. The only way this might have been a `nullptr` pointer was
through several default constructors which were not used at all so I
removed them.
2023-08-04 18:17:27 +02:00
Samuel Poláček
b2511fb3ae
Check if --cppcheck-build-dir exists ( #5254 )
...
Cppcheck does not report that cppcheck build dir does not exist and also
does not report any write issues to the non-existent directory.
This means that cppcheck build dir is actually not used.
We should either create the directory or fail.
2023-08-04 17:38:43 +02:00
Oliver Stöneberg
5d201c4e87
testrunner: use structs with designated initialization to pass options ( #4975 )
...
I need to add parameters to some `check()` functions in the tests and
things are already pretty messy with having to specify all the default
values - readability aside.
I found this on https://stackoverflow.com/a/49572324/532627 - apparently
the CC BY-SA license by StackOverflow allows the usage within GPL.
2023-08-04 13:56:18 +02:00
Oliver Stöneberg
4aae670b45
donate-cpu: fixed #11276 (donate-cpu: Improve library detection) / respect `--no-upload` in "nodata" uploads ( #5292 )
...
We were only matching each library once as the entry was removed from
the container stored in the class as we did not modify a copy but a
reference.
2023-08-04 10:30:58 +02:00
chrchr-github
5ff8955dbe
Fix #11862 FP truncLongCastAssignment with increment ( #5290 )
2023-08-03 13:49:11 +02:00
Oliver Stöneberg
da6c39e971
iwyu.yml: actually disable archlinux step [skip ci] ( #5287 )
...
I accidentally left this own when I rolled back a previous attempt to
implement the conditional checks.
2023-08-02 14:49:48 +02:00
chrchr-github
faf8047050
Fix FP truncLongCastReturn on Windows ( #5262 )
2023-08-02 12:27:29 +02:00
Oliver Stöneberg
de0fdc85a2
donate-cpu-server.py: adjusted head information summary name / added `internalError` to overview ( #5283 )
2023-08-02 10:43:06 +02:00
Oliver Stöneberg
45de338f1b
cleaned up includes based on include-what-you-use / iwyu.yml: updated to yet another distro to get the latest version and updated the Chaotic-AUR key ( #5267 )
...
This is a mess. The version is AUR is still outdated and also doesn't
install anymore. Fedora 38 carries the latest version of it so use that
now. Keep the old steps in case we need to switch again in the future.
2023-08-02 10:36:17 +02:00
Paul Fultz II
389e446dc0
Fix 11848: Assert failure in getParentValueTypes() ( #5274 )
2023-08-02 10:29:19 +02:00
chrchr-github
931a59a724
Fix FN variableScope ( #5273 )
...
Co-authored-by: chrchr-github <chrchr@github>
2023-08-01 23:56:24 +02:00
Oliver Stöneberg
4452ae6d09
iwyu.yml: applied `apt.llvm.org` workaround as well [skip ci] ( #5286 )
2023-08-01 22:56:44 +02:00
chrchr-github
bc54fab989
Workaround for CI failure ( #5285 )
...
From
https://github.com/llvm/llvm-project/issues/64182#issuecomment-1658085767
2023-08-01 14:28:13 +02:00
Oliver Stöneberg
5a322365a6
fixed `scriptcheck.yml` ( #5268 )
2023-08-01 13:06:12 +02:00
Samuel Poláček
e7a2585e0a
noExplicitConstructor - Verbose error message edit ( #5260 )
...
The goal is to use keywords like "converting constructor" and "implicit
conversion" that will help users further study what this warning is
about. I think that the old message provided no context to the
uninitiated.
2023-08-01 11:21:23 +02:00
chrchr-github
bfaa7c075a
Fix #11845 FP variableScope if buffer is passed to a conditionally called function ( #5265 )
...
Co-authored-by: chrchr-github <chrchr@github>
2023-07-27 22:18:34 +02:00
chrchr-github
99f7f88f39
Fix FN constParameterPointer ( #5270 )
...
Co-authored-by: chrchr-github <chrchr@github>
2023-07-27 20:54:12 +02:00
Tobias
f10851dc37
posix.cfg: erand48/nrand48/jrand48 fixed argument direction ( #5253 )
2023-07-27 07:50:46 +02:00
Oliver Stöneberg
265759dfa4
tokenlist.cpp: fixed GCC `-Wunused-variable` warning ( #5266 )
...
Added https://trac.cppcheck.net/ticket/11847 about the false negative.
2023-07-27 07:27:04 +02:00
Samuel Poláček
c5deb0a631
Fix a typo in error message ( #5264 )
2023-07-26 07:54:59 +02:00
Samuel Poláček
3186577f45
Add author of #5252 to AUTHORS ( #5263 )
...
Add me to AUTHORS after my first merged PR #5252
2023-07-25 17:47:19 +02:00
Samuel Poláček
ba764eaddc
unusedFunction disabled warning is not printed if --cppcheck-build-dir is used ( #5252 )
...
ususedFunction check is enabled if cppcheck build dir is used. Warning
about disabled unusedFunction check should not be printed in such case.
2023-07-25 12:00:23 +02:00
chrchr-github
2cf4b3a6f3
Fix functionConst TODO ( #5261 )
2023-07-24 16:26:23 +02:00
chrchr-github
101ddea1e6
Fix #11840 FP constStatement with template parameters on operator ( #5258 )
2023-07-21 17:33:18 +02:00
chrchr-github
a6b0129725
Fix #11838 FP uninitvar with label matching variable name ( #5251 )
2023-07-20 10:45:44 +02:00
chrchr-github
d2546d5252
Fix #11788 False positive: unreadVariable in else ( #5248 )
2023-07-18 21:11:03 +02:00
chrchr-github
2878c68ec0
Fix FP unknownMacro ( #5249 )
2023-07-18 12:16:54 +02:00
Tomo Dote
c2ed362c11
Update Japanese translation ( #5246 )
...
Update Japanese translation only
- modified: gui/cppcheck_ja.ts
2023-07-17 11:09:39 +02:00
Paul Fultz II
92caa835b6
Fix 11806: FP uninitvar for reference to unitvar in ternary ?: operator ( #5247 )
2023-07-17 10:34:54 +02:00
chrchr-github
e4827cb3df
Fix #11828 False positive when getting a span via an out argument ( #5243 )
...
We didn't warn for the TODO even before this change.
2023-07-15 17:53:40 +02:00
chrchr-github
72212331fb
Fix #11832 False positive: uninitialized variable '*(&var) = 0' ( #5241 )
2023-07-14 19:14:33 +02:00