Commit Graph

1487 Commits

Author SHA1 Message Date
chrchr-github 39567ea8c8
Fix FP variableScope (std::for_each with lambda) () 2022-03-22 21:50:46 +01:00
chrchr-github 0e147502cc
Fix FN variableScope with enum and struct ()
* Fix  FN variableScope with enum and struct

* Scope reduction

* Scope reduction
2022-03-21 16:05:38 +01:00
chrchr-github 297b0b5c60
Fix FP: Label 'enum' is not used. [unusedLabel] () 2022-03-17 17:38:23 +01:00
chrchr-github 97ce569859
Fix FP constStatement with extra parentheses in function call ()
* Fix  FP constStatement with extra parentheses in function call

* Format
2022-03-17 12:47:27 +01:00
chrchr-github b8ba0ae00e
Fix FP constStatement with ternary and comma operator () 2022-03-16 15:28:59 +01:00
chrchr-github d3d40fd599
Fix #10868/#10869 FN: constStatement, handle unused character constants ()
* Fix  FN: constStatement, handle unused character constants

* simpleMatch

* Fix  FN: constStatement

* Format
2022-03-14 14:14:32 +01:00
Oliver Stöneberg 757287b13c
removed unnecessary varid0 inline suppressions () 2022-03-12 18:02:40 +01:00
chrchr-github 3df170c191
Fix FN: constStatementError, streamline error messages () 2022-03-12 14:52:18 +01:00
chrchr-github 705931266c
constStatementError: don't warn for casts with possible side effects,… ()
* constStatementError: don't warn for casts with possible side effects, handle bool constants

* Recursive call, add tests

* Restore test

* Don't warn for C++ casts to void

* Don't warn for cast to void*
2022-03-11 21:45:51 +01:00
chrchr-github 850ad0fed9
: Add error message for unused casts, log unhandled errors ()
* : Add error message for unused casts, log unhandled errors

* Fix TODO

* Fix TODO
2022-03-09 18:21:47 +01:00
chrchr-github f53793c413
Fix FP cstyleCast with function pointer and calling convention () 2022-02-23 09:12:14 +01:00
Oliver Stöneberg b6876d22e6
use inline suppressions for varid0 in selfcheck () 2022-02-21 18:35:02 +01:00
chrchr-github 18e00bb4fd
Fix Crash in checkPassByReference() / Stack overflow with decltype / Crash on invalid code ()
* Fix  Crash in checkPassByReference()

* Format

* Fix  Stack overflow with decltype

* Fix  Crash on invalid code in TemplateSimplifier::templateParameters
2022-02-18 12:59:21 +01:00
Daniel Marjamäki d5ef25e477 Add constParameter and constParameterCallback in --errorlist output 2022-02-13 16:17:53 +01:00
Daniel Marjamäki f2420509c9 Revert "constPointer: Fix false positives when pointer is not read"
This reverts commit 6427b4888b.

If variable/parameter is unused it is better to warn about that.
2022-02-13 08:40:45 +01:00
Daniel Marjamäki 6427b4888b constPointer: Fix false positives when pointer is not read 2022-02-12 22:23:25 +01:00
chrchr-github c5ab936088
Fix FN shadowVariable in range-based for loop () 2022-02-12 08:10:53 +01:00
Oliver Stöneberg 6e57cc4323
small utils.h cleanup () 2022-02-11 19:44:08 +01:00
chrchr-github 5f3ddabd56
Fix FP constParameter with std::map () 2022-02-11 19:40:11 +01:00
Julien Marrec 2535bf984b
Allow passing std::string_view by value () 2022-02-10 21:01:12 +01:00
chrchr-github cd7532df21
Fix FN C-style pointer casting with built-in or typedef types /… () 2022-02-10 20:48:51 +01:00
chrchr-github e64ea20089
Fix FP variableScope for if with init-statement () 2022-02-08 16:12:09 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg 8f7770f512
added an include-what-you-use GitHub Action () 2022-02-01 17:19:19 +01:00
chrchr-github 0807924d32
Fix FP passedByValue for unions / FN passedByValue for array members () 2022-02-01 17:17:08 +01:00
Daniel Marjamäki 637aca8d59 Fixed (False positive: shadow variable in static method) 2022-01-28 16:03:06 +01:00
Oliver Stöneberg 171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use () 2022-01-27 19:03:20 +01:00
chrchr-github 158f3d494e
Fix false positive: redundantInitialization with std::shared_ptr () 2022-01-24 21:50:50 +01:00
chrchr-github cb5a50c6a7
Fix FN passedByValue with QString () 2022-01-18 20:17:05 +01:00
chrchr-github e8260f2dcc
Improve fix for : check if ternary operator is used in assignment to reference () 2021-12-16 22:32:15 +01:00
Daniel Marjamäki c7ef602cd6 Fixed (False positive: constParameter on parameter used by non-const call via pointer to member function) 2021-11-21 20:03:38 +01:00
Daniel Marjamäki 921f5c1818 Fixed (False positive: constVariable, buffer written by stream read) 2021-10-18 19:38:53 +02:00
Daniel Marjamäki 6234e9ddda Fixed (FP constParameter with array member and memcpy) 2021-09-15 21:25:16 +02:00
chrchr-github 05acc13582
Shadow variables, const, rename function () 2021-09-15 20:28:58 +02:00
Daniel Marjamäki e95395e5f0 Fixed (FP constParameter - implementing an interface) 2021-08-10 15:37:59 +02:00
Paul Fultz II 7f358b2bed
Format with uncrustify () 2021-08-07 20:51:18 +02:00
Paul Fultz II 41c94b656a
Fix FP const pointer with class variable and add more tests () 2021-07-21 07:36:13 +02:00
Daniel Marjamäki fb5ab5e439 constPointer; Improved checking dereferenced pointer is used in calculation/comparison 2021-07-20 10:38:38 +02:00
Daniel Marjamäki 4d23c02320 constPointer; Improved checking when pointer is not dereferenced 2021-07-20 10:28:35 +02:00
Daniel Marjamäki eb9a251a4c const variables/parameters; Improved check to handle pointers also (misra 8.13) 2021-07-18 10:59:52 +02:00
orbitcowboy 0d96772304 Running astyle [ci skip] 2021-07-09 16:32:19 +02:00
Daniel Marjamäki 86f1acc223 overlapping data; use the size value given by size-arg 2021-07-09 13:43:29 +02:00
Daniel Marjamäki ce58748690 library: add attribute strlen-arg for <not-overlapping-data> 2021-07-09 13:25:01 +02:00
Daniel Marjamäki 6234b5438e New check: Writing overlapping data, detect undefined behavior 2021-07-05 22:07:41 +02:00
Daniel Marjamäki 1783fd1bba duplicateBreak; Allow extra return that clarifies for tool(s) that function does not continue 2021-06-29 11:17:12 +02:00
Daniel Marjamäki 9769afe434 knownConditionTrueFalse; avoid several warnings when nonzero expression is compared to see if it is positive or negative 2021-06-25 16:25:25 +02:00
Daniel Marjamäki 87554bed7a Redundant pointer op; Fixed false positives when macro is used 2021-05-22 14:18:29 +02:00
Daniel Marjamäki 32b28d568f Refactoring; Check structured binding in isVariableChanged() 2021-05-08 20:46:46 +02:00
Daniel Marjamäki a197e94573 Fixed (False positive; parameter can be const) 2021-05-08 13:40:52 +02:00
Daniel Marjamäki 07c1f28035 astyle formatting 2021-05-01 07:35:03 +02:00