Commit Graph

11877 Commits

Author SHA1 Message Date
chrchr-github 456c6b410e
Fix FN known strcpy parameter ()
* Fix  FN known strcpy parameter

* Parentheses

* Format
2022-08-24 21:23:45 +02:00
Daniel Marjamäki 112852f70b formatting 2022-08-24 08:53:59 +02:00
Oliver Stöneberg 467648bec6
fixed (potential hang with -j and --showtime= when using threads) - synchronized access to `TimerResults::mResults` / added TSAN to CI () 2022-08-23 20:30:45 +02:00
chrchr-github 13e8d5220c
Fix another c_strParam regression () 2022-08-23 20:26:36 +02:00
chrchr-github 4be7f689d7
Fix c_strParam regression ()
* Fix  New check: Not needed c_str() operation

* Comment

* Detect more instances of c_str() misuse

* Fix bad merge

* Check for data() also

* Fix

* Format

* Format

* Fix c_strParam regression
2022-08-23 15:00:27 +02:00
chrchr-github 66fca7ba91
Detect more instances of c_str() misuse ()
* Fix  New check: Not needed c_str() operation

* Comment

* Detect more instances of c_str() misuse

* Fix bad merge

* Check for data() also

* Fix

* Format

* Format
2022-08-22 14:06:10 +02:00
PKEuS d81a758850
LCppC backports: Refactorizations/Optimizations () 2022-08-21 17:21:02 +02:00
chrchr-github d351a97a0f
Fix FN stlcstrParam ()
* Fix  New check: Not needed c_str() operation

* Comment

* Fix error messages

* Handle more complex string expressions

* Fix  FN stlcstrParam

* Handle iterators

* Format

* Format

* Parentheses
2022-08-21 13:04:43 +02:00
Oliver Stöneberg 1202efb438
some `--exception-handling` related improvements () 2022-08-20 20:54:31 +02:00
chrchr-github b04bf7396f
Fix New check: Not needed c_str() operation () 2022-08-20 20:52:10 +02:00
chrchr-github 5cc8ef7e87
Add test for ()
* Add test for 

* Add test for 

* Revert
2022-08-20 19:23:55 +02:00
Oliver Stöneberg 1d95d1908d
refs - sped up `Library::detectContainerOrIterator()` by iterating the containers only once () 2022-08-20 12:14:55 +02:00
chrchr-github 2ab8de2650
Fix FP negativeMemoryAllocationSize with possible value () 2022-08-20 07:56:31 +02:00
Oliver Stöneberg f138df2909
mathlib.h: replaced slow `std::ostringstream` with `std::to_string()` in `MathLib::toString()` () 2022-08-19 20:44:24 +02:00
chrchr-github 80a486dda0
Fix FP virtual call in destructor even though class is final / Delete 'final' from specializations ()
* Add 'final' keyword

* Delete 'final' from specializations

* Fix  FP virtual call in destructor even though class is final

* Fix test
2022-08-19 18:26:00 +02:00
Oliver Stöneberg 1b4141cbe5
added more missing `sstream` includes () 2022-08-19 18:23:15 +02:00
chrchr-github 1aa259569e
Fix syntax error : int (operator"" _ii)(unsigned long long v) … ()
* Fix  syntax error : int (operator"" _ii)(unsigned long long v) { return v; }

* Format
2022-08-18 23:38:45 +02:00
chrchr-github 2fee7a6e3f
Add test for , ()
* Add test for 

* Add test for 

* Add test for 

* Format

* Add test for 

* Format

* Add test for 
2022-08-18 23:37:41 +02:00
chrchr-github 6a0c254d1f
Fix FP zerodiv (daca@home) ()
* Fix  FP zerodiv (daca@home)

* Format

* Parentheses

* clang-tidy
2022-08-18 20:38:36 +02:00
chrchr-github 4a64e20592
unusedScopedObject: Don't warn for void statements ()
* Fix unusedScopedObject FPs

* Simplify

* Simplify

* Fix test

* Don't warn for void statements

* Format
2022-08-17 19:45:46 +02:00
chrchr-github e9f1665d4f
Add test for ()
* Add test for 

* Add test for 

* Add test for 

* Format
2022-08-17 19:38:37 +02:00
chrchr-github 0978cc2d46
Add tests for , () 2022-08-17 10:01:49 +02:00
chrchr-github 5b4c6c1e73
Fix FP pointerOutOfBounds with strlen() () 2022-08-17 09:45:07 +02:00
chrchr-github 1a95515e47
Fix unusedScopedObject FPs () 2022-08-17 09:11:23 +02:00
chrchr-github 3dc2c0bd42
Fix FN constStatement with misused comma () 2022-08-16 22:10:58 +02:00
Oliver Stöneberg 31d704e4bc
cppcheckexecutor.cpp: extracted platform-dependent code into separate files () 2022-08-16 22:03:44 +02:00
Oliver Stöneberg 4bf5dcd29f
cleaned up includes based on include-what-you-use ()
* cleaned up includes based on include-what-you-use

* testlibrary.cpp: no need for `empyString` optimization
2022-08-14 12:44:19 +02:00
chrchr-github afef71f6b6
Partial fix for unused variable without assignment not detected ()
* Partial fix for  unused variable without assignment not detected

* Add test for 
2022-08-13 08:29:06 +02:00
Paul Fultz II bfd9470600
Fix 11158: FP zerodiv in loop ()
* Fix 11158: FP zerodiv in loop

* Format

* Add another test

* Format

* Fix FP

* Format
2022-08-13 08:27:20 +02:00
chrchr-github bdbd84ba98
: Fix regression ()
* Fix  FP knownConditionTrueFalse with constexpr?

* Modify isConstVarExpression()

* Use predicate

* Format

* : Fix regression
2022-08-09 13:13:16 +02:00
chrchr-github 974e34490f
Fix FP Unused private function () 2022-08-07 20:06:32 +02:00
chrchr-github 078a6d7804
Fix FP knownConditionTrueFalse with constexpr? () 2022-08-07 19:06:19 +02:00
chrchr-github d5a0dfda00
Fix checkLibraryCheckType with asm goto() (invalid varid), add test for ()
* Add test for , avoid duplicate warning

* Add test for 

* Fix test

* Merge

* Add test for 

* Fix  checkLibraryCheckType with asm goto() (invalid varid)

* Format
2022-08-04 21:35:18 +02:00
Paul Fultz II c0f55a2b85
Fix 11142: FP nullPointer before assignment ()
* Fix 11142: FP nullPointer before assignment

* Format

* Use simpleMatch
2022-08-03 19:05:07 +02:00
Paul Fultz II 6cb3a79a64
Fix 11147: FP invalidContainer with substr() ()
* Fix 11147: FP invalidContainer with substr()

* Format
2022-08-03 19:04:44 +02:00
chrchr-github dd927aab9b
Fix checkLibraryNoReturn with unassigned object ()
* Handle float values

* Fix  checkLibraryNoReturn with unassigned object
2022-08-03 19:04:10 +02:00
chrchr-github a62c3ea90e
Fix Broken AST with auto**, FP constStatement () 2022-08-03 19:03:38 +02:00
chrchr-github 0eabe0505b
Handle float values () 2022-08-02 22:11:31 +02:00
chrchr-github 71f9a7269f
Add test for , , avoid duplicate warning ()
* Add test for , avoid duplicate warning

* Add test for 

* Fix test
2022-08-02 21:43:18 +02:00
chrchr-github bc409776e3
Fix Wrong redundant condition: misleading/wrong message ()
* Fix  Wrong redundant condition: misleading/wrong message

* Use expressionString()

* Clarify condition

* Update testcondition.cpp

* Trigger CI
2022-08-02 18:31:02 +02:00
chrchr-github 92d569afb6
FP: knownConditionTrueFalse (wrong message text) ()
*  FP: knownConditionTrueFalse (wrong message text)

* Format

* Update testcondition.cpp

* Trigger CI
2022-08-02 18:18:46 +02:00
chrchr-github 38fdbe0890
Fix Syntax error for function-try-block in global scope ()
* Fix  Syntax error for function-try-block in global scope

* static through instance

* Handle multiple catch blocks

* Add test

* Fix skip logic

* Handle init lists in simplifyFunctionTryCatch()
2022-07-31 14:49:50 +02:00
chrchr-github c878285a42
Add tests for , , , () 2022-07-30 16:15:32 +02:00
orbitcowboy 1934386738 windows.cfg: deprecate '_alloca()'. Ref. https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/alloca?view=msvc-170 2022-07-29 21:41:32 +02:00
Oliver Stöneberg efaaa58896
fixed some `modernize-use-emplace` false negatives and some `bugprone-assignment-in-if-condition` warnings () 2022-07-28 22:53:59 +02:00
chrchr-github 304e448749
Fix --check-library reports missing configuration for static_assert () 2022-07-28 22:47:15 +02:00
chrchr-github c340b6ae6c
Fix FP moduloofone with pow() () 2022-07-28 22:11:23 +02:00
Daniel Marjamäki 898ad314ab badBitmaskCheck: Avoid FP when there is #ifdef in expression 2022-07-28 21:56:05 +02:00
chrchr-github 3fc276fb51
Add test for () 2022-07-26 11:14:35 +02:00
chrchr-github 58d7185d64
Fix FP functionConst when overloaded operator ++ is used () 2022-07-26 08:30:59 +02:00