Commit Graph

576 Commits

Author SHA1 Message Date
chrchr-github 31118fdce5
Fix noreturn FP with while() ()
* Fix checkLibraryFunction FPs

* Fix FP with fclose()

* Format

* Fix FP with reinterpret_cast

* Fix noreturn FP with while()
2022-09-04 10:26:31 +02:00
Tau c17e2b9826
Correctly interpret boolean literals in `execute()` ()
* Correctly interpret boolean literals in `execute()`

* Add regeression test case for boolean literals
2022-07-08 12:39:29 +02:00
Paul Fultz II 185294499c
Adjust the severity of the uninitvar () 2022-06-28 22:52:35 +02:00
chrchr-github 11860cce4b
Add test for ()
* Add test for 

* Comment

* Fox comment
2022-06-24 13:55:04 +02:00
chrchr-github 6f5a5fd947
Add some tests ()
* Add test for 

* Add test for 

* Fix test

* Add test for 

* Add test for 

* Add test for 

* Format

* Format

* Fix test

* Remove duplicate test

* Add valueflow test

* Rebuild
2022-06-14 09:54:45 +02:00
chrchr-github ad547af6f9
Add tests for , , ()
* Add tests for , 

* Add test for 

* Add tests for , 

* Add test for 

* Comment
2022-05-10 18:25:01 +02:00
chrchr-github adba751217
Fix FP uninitvar with redundant pointer op ()
* Skip redundant pointer op

* Fix   FP uninitvar with redundant pointer op

* Format
2022-05-05 06:54:27 +02:00
Paul Fultz II 496b45f27b
Fix 11009: FP uninitvar ()
* Fix 11009: FP uninitvar

* Format
2022-05-04 05:59:01 +02:00
Paul Fultz II aafd1e10be
Fix 11006: FP uninitvar with unknown constant () 2022-04-28 10:48:37 +02:00
chrchr-github 6df0f9b3e3
Add tests for , , () 2022-04-27 12:43:21 +02:00
orbitcowboy bb98ccf7d4 Ticket - Added a regression test 2022-04-26 07:45:08 +02:00
chrchr-github 1bc0317719
Fix FP uninitStructMember with extra parentheses () 2022-04-25 22:22:35 +02:00
Paul Fultz II 6b9ac6f7a8
Warn when incrementing uninitialized value ()
* Warn when incrementing uninitialized value

* Format
2022-04-24 09:56:58 +02:00
Paul Fultz II 3feecc51d6
Fix 10988: FP: Regression, uninitvar () 2022-04-21 19:29:38 +02:00
Paul Fultz II d97942d3c6
Fix 6577: Detect pointer to uninitialised memory with clock_settime() ()
* Fix 6577: Detect pointer to uninitialised memory with clock_settime()

* Format
2022-04-11 07:23:44 +02:00
Paul Fultz II 5bea50cd36
Fix 10908: FP: uninitvar after for-loop () 2022-03-31 21:24:20 +02:00
chrchr-github 948bb8df94
Add test for , () 2022-03-30 15:49:45 +02:00
Paul Fultz II 21b8c36eb1
Fix 10916: FP: uninitvar () 2022-03-27 10:01:58 +02:00
chrchr-github 479af21405
Fix FP uninitvar with new and braced initializer () 2022-03-24 20:08:51 +01:00
Paul Fultz II 4b4037540a
valueFlowUninit: Handle arrays and pod types ()
* valueFlowUninit: Handle arrays and pod types

* Format

* Catch another array case
2022-03-24 06:35:44 +01:00
chrchr-github 1aff160411
Fix FP uninitvar after lambda expression ()
* Fix  FP uninitvar after lambda expression

* Format
2022-03-15 14:32:33 +01:00
Oliver Stöneberg f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly () 2022-02-10 23:02:24 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
chrchr-github 2b13a27140
Fix FP uninitdata - writing pointer to stream () 2022-02-02 12:24:32 +01:00
chrchr-github c74eeb6bad
Fix FN uninitVar with std::array () 2022-01-27 19:45:27 +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 f49cfcd23c
Fix False positive: uninitStructMember () 2022-01-25 12:14:20 +01:00
Oliver Stöneberg 55ff684f34
added unusedFunction self check to CI / cleanups () 2022-01-18 22:02:25 +01:00
chrchr-github 9c56e7ea8d
Fix FN uninitialized variable usage not detected () 2022-01-17 20:35:30 +01:00
chrchr-github 12abf85d1d
Add test case for , use TODO_ASSERT, enable test case ()
* Add test case for , use TODO_ASSERT, enable test case

* Comment
2022-01-13 19:52:02 +01:00
Paul Fultz II 0c9eb5d190
Fix 10681: FP ctuuninitvar with array member () 2022-01-08 10:47:28 +01:00
KenPatrickLehrmann af289c8357
Handle (&foo)-> in isVariableChanged () 2022-01-02 08:14:10 +01:00
Paul Fultz II d36aa590cd
Fix 10553: FP uninitvar with strcpy () 2021-12-23 08:22:41 +01:00
Paul Fultz II 332f4c205a
Fix 9772: FP uninitvar: in cppcheck 2.1 () 2021-12-17 21:51:47 +01:00
Oliver Stöneberg ba402f3e50
cleaned up includes based on include-what-you-use () 2021-12-15 19:47:27 +01:00
chrchr-github ca311ebcdf
ASSERT() on calls to Tokenizer::tokenize() in test code () 2021-11-29 07:34:39 +01:00
chrchr-github 629f883408
Fix : autovarInvalidDeallocation with pointer to std::array () 2021-11-08 20:31:16 +01:00
Paul Fultz II 1791457227
Fix 9953: false positive: uninitvar () 2021-11-07 06:51:19 +01:00
Paul Fultz II ffc2a9d8e2
Fix 9735 for valueFlowUninit () 2021-11-06 19:06:07 +01:00
orbitcowboy bd63882d80 testuninitvar: - Moved test to valueFlowUninit. 2021-10-31 07:14:00 +01:00
Paul Fultz II 8c9c46835a
Fix for 6597: false negative: uninitialized variable usage not detected (ValueFlow , multi variables) () 2021-10-30 22:13:58 +02:00
orbitcowboy 242acb6135 testuninitvar: Moved test into CTU section. 2021-10-30 17:07:52 +02:00
orbitcowboy be2ba0f772 Ticket - Added regression test 2021-10-30 16:31:59 +02:00
Paul Fultz II e20ddd55d6
Propagate partially uninit variables in ValueFlow () 2021-10-30 07:43:37 +02:00
Paul Fultz II ca83222bae
Add subexpression analyzer to set values for uninitialized members of struct ()
* Add subexpression analyzer

* Fix errors

* Add tests

* Format

* Add more tests

* Run members first

* Format

* Uncomment todo assert

* Formatting

* Use simpleMatch
2021-10-21 14:44:48 +02:00
Paul Fultz II 257efb4019
Check if uninit value is used in library function () 2021-10-20 20:51:59 +02:00
orbitcowboy 9c16f13651 Format 2021-10-16 00:31:55 +02:00
orbitcowboy d4a98dfaab Ticket : Added a regression test 2021-10-15 22:50:29 +02:00
Paul Fultz II 2ca2abdf0e
Remove duplicate uninit warnings () 2021-10-04 07:50:23 +02:00
Daniel Marjamäki eb50d19657 Uninitvar: Moved testcases for avoiding extra warnings from TestValueFlow to TestUninitVar 2021-10-03 22:15:35 +02:00