Commit Graph

27487 Commits

Author SHA1 Message Date
chrchr-github 89df134fed
Fix Crash in calculate.h () 2023-10-24 10:05:32 +02:00
Oliver Stöneberg 309b4d8501
donate-cpu: some small improvements ()
- added timing information to "finished" log message in `scan_package()`
- adjusted some log messages
- avoid unnecessary `git checkout` invocation if non-`main` binary
already exists
2023-10-23 12:53:34 +02:00
chrchr-github 7e2fcea3d9
Fix FN knownConditionTrueFalse comparing qualified constant with number () 2023-10-23 11:18:05 +02:00
Oliver Stöneberg a765a1310d
ValueFlow: omit unnecessary location information from `valueFlowBailoutIncompleteVar` ()
This is unnecessary since we only issue it from a single location. It
also leads to a lot of unnecessary noise in the daca diff reports.
2023-10-23 10:13:10 +02:00
Swasti Shrivastava b58a6b6911
Fix , : FP: misra-c2012-14.2 () 2023-10-23 08:51:47 +02:00
Oliver Stöneberg 3103736c51
refs / refs / fixes - generate `limits.h`/`climits` defines from platform () 2023-10-21 17:21:12 +02:00
Oliver Stöneberg 09785a4eb8
moved `MyFileInfo` definitions into source files () 2023-10-21 16:58:29 +02:00
chrchr-github 26ba29c303
Fix FN passedByValue with index operator and namespaced function call () 2023-10-21 12:41:39 +02:00
chrchr-github f4d18a8d1e
FP constStatement with ctor in namespace () 2023-10-21 12:12:56 +02:00
Oliver Stöneberg 27bd972832
test/CMakeLists.txt: updated the test fixture costs () 2023-10-21 09:15:22 +02:00
Oliver Stöneberg 85f40ed47c
moved `TokensFrontBack` from `token.h` to `tokenlist.h` () 2023-10-21 09:14:25 +02:00
Oliver Stöneberg 7086ffaa1b
fixed - print error when using an option which has not been compiled in instead of treating it as non-existent or a no-op ()
Also disabled more internal code around those options and did some
cleanups.
2023-10-21 09:12:59 +02:00
chrchr-github 41bd28c0b3
Fix Library: add Container::Action::FIND_CONST () 2023-10-20 21:22:06 +02:00
chrchr-github b61feaf77f
Fix syntaxError with const lambda (refs ) () 2023-10-20 15:32:46 +02:00
chrchr-github 0070a78101
Fix FP constStatement with delete in loop increment () 2023-10-20 10:25:31 +02:00
Daniel Marjamäki 17ea101e7b
Fix (Tokenizer::simplifyTypedef: Handle volatile structs better) () 2023-10-19 21:02:03 +02:00
Swasti Shrivastava 04ece4f65b
Fix : Misra: calling unknown function in condition => false pos… ()
…itive 14.4, missing misra-config warning
2023-10-19 19:38:20 +02:00
Paul Fultz II f2c8153231
Set the lower and upper bounds for variable that are only incremented or decremented ()
Also, changed `isExpressionChanged` and `isThisChanged` to return the
token that is being modified and renamed the functions to
`findExpressionChanged` and `findThisChanged`.
2023-10-19 18:42:52 +02:00
chrchr-github 7c3ae68e4d
Fix FP constStatement unused variable () 2023-10-19 10:51:16 +02:00
Paul Fultz II e1a120e6b0
Partial fix for 12031: False positive: uninitialized variable () 2023-10-18 23:49:22 +02:00
chrchr-github 09f426d980
Fix FP uninitvar for assignment to array member in conditional () 2023-10-18 18:50:49 +02:00
chrchr-github 285ef96b5b
Report unknownMacro in string concatenation (refs ) () 2023-10-18 18:46:47 +02:00
chrchr-github b60b374f9c
Fix internalASTError with decltype (regression, refs ) () 2023-10-18 12:17:20 +02:00
Oliver Stöneberg bfe19af6b2
fixed some "Declaration and assignment can be joined" Rider warnings () 2023-10-18 10:06:17 +02:00
Oliver Stöneberg b40d36a09e
fixed - use less heavy code in executor tests ()
The allocation invokes some heavy ValueFlow computations. We just want
to generate an unconditional error from the analysis so use some lighter
code which does the same.

`TestThreadExecutorFiles::deadlock_with_many_errors`

Before:
```
real    0m23.517s
user    0m33.453s
sys     0m2.297s
```

After:
```
real    0m5.051s
user    0m6.234s
sys     0m0.422s
```
2023-10-17 20:24:37 +02:00
Oliver Stöneberg 85fe627c68
fixed some typos () 2023-10-17 18:32:07 +02:00
Daniel Marjamäki dd76504f82
Fixed (Allow inline suppression comments for macros) () 2023-10-16 19:43:15 +02:00
Swasti Shrivastava ad4e688ff8
Fix : FP: misra-c2012-10.4 (char)'1' != (char) () 2023-10-16 18:53:51 +02:00
Oliver Stöneberg 3811d01498
fixed "Redundant dereferencing and tasking address expression" Rider warnings () 2023-10-16 14:09:03 +02:00
Oliver Stöneberg 5e89eb05a6
iwyu.yml: made `include-what-you-use` output more verbose / cleaned up includes () 2023-10-16 12:57:49 +02:00
chrchr-github 93297727ef
Fix internalASTError with decltype (refs ) () 2023-10-15 20:47:01 +02:00
Swasti Shrivastava dde956b085
Fix 10855,11752:False positive: misra-c2012-22.10 () 2023-10-15 17:33:35 +02:00
chrchr-github f13134a6a4
Refactoring: use init list, redundant init () 2023-10-15 14:51:12 +02:00
orbitcowboy 16c5a11786
posix.cfg: Warn in case the return value of localtime() is ignored. () 2023-10-14 16:59:42 +02:00
chrchr-github 903df84ddc
Fix FN constStatement with enum () 2023-10-13 21:40:47 +02:00
Daniel Marjamäki ec15772381
Refactoring suppressions code. () 2023-10-13 19:57:08 +02:00
chrchr-github efd488b519
Partial fix for FN: memleak () 2023-10-13 18:47:06 +02:00
chrchr-github f56677a99d
Fix FP constParameterReference with std::map () 2023-10-13 18:08:40 +02:00
Oliver Stöneberg ebb877adcc
gui/platforms.h: renamed `Platform` to `PlatformData` / Platform: removed unnecessary `cppcheck` namespace () 2023-10-13 16:02:04 +02:00
Daniel Marjamäki 579938a6ff
AUTHORS: Add JohanBertrand [ci skip] () 2023-10-13 12:48:50 +02:00
Johan Bertrand 44ab976451
Inline suppression for block of code or whole file ()
Added new suppress comments:
- `cppcheck-suppress-begin` and `cppcheck-suppress-end` to remove blocks
of suppression
- `cppcheck-suppress-file` to remove suppression at file level

The suppressions do not interfere with each others. For example, all the
suppressions are matched in the following code:

```c
// cppcheck-suppress-file uninitvar
void f() {
    int a;
    // cppcheck-suppress-begin uninitvar
    // cppcheck-suppress uninitvar
    a++;
    // cppcheck-suppress-end uninitvar
}
```

Tickets:
https://trac.cppcheck.net/ticket/11902
https://trac.cppcheck.net/ticket/8528
2023-10-13 12:45:13 +02:00
chrchr-github 8ef4da475a
Add test for , () 2023-10-12 16:27:10 +02:00
Daniel Marjamäki 9d4e3829c2
Partial fix (False positive: uninitialized variable, conditional modification, flag) () 2023-10-12 13:56:47 +02:00
Oliver Stöneberg 8c0d43d928
removed unnecessary encapsulation of severity enum and made it an `enum class` () 2023-10-12 11:58:39 +02:00
chrchr-github 179d26f06b
Fix FP useStlAlgorithm with loop over initializer list () 2023-10-12 10:06:52 +02:00
chrchr-github e247e818ec
Fix FP: containerOutOfBounds () 2023-10-11 14:08:17 +02:00
Oliver Stöneberg 784b526365
installer: added missing library configurations and removed unneeded Qt DLLs / refs - added initial portable package () 2023-10-11 13:26:12 +02:00
Oliver Stöneberg 0f70f193ad
buildman.yml: fixed `manpage` job ()
```
Invalid workflow file: .github/workflows/buildman.yml#L42
You have an error in your yaml syntax on line 42
```
2023-10-11 12:33:13 +02:00
Oliver Stöneberg d757f8b8fc
fixed - donate_cpu_lib.py: removed `--showtime=none` option not supported by the previous version () 2023-10-10 11:53:46 +02:00
Oliver Stöneberg 7393083d5d
added `CmdLineLogger::printRaw()` / CppCheckExecutor: more `CmdLineLogger` usage () 2023-10-09 22:22:39 +02:00