Commit Graph

25357 Commits

Author SHA1 Message Date
Daniel Marjamäki 33446d0c75 exprengine; add CONTRACT #define so contract-handling can be enabled/disabled 2022-01-03 17:10:18 +01:00
Daniel Marjamäki 33305ef4ec exprengine: better checking for uninit variables 2022-01-03 12:47:13 +01:00
Oliver Stöneberg 6739995e79
removed or annotated some code which is only used in test code (#3656) 2022-01-03 12:40:20 +01:00
guillaume-uH57J9 dfd22919bc
donate_cpu_lib.py: fix callstack capture, fix dependency check (#3665)
* donate_cpu_lib.py: fix callstack capture, fix dependency check

check_requirements: verify that module psutil is available. 
scan_package: collect crash callstack regardless of cppcheck_path and cppcheck version

* donate_cpu_lib.pu: remove debug code

* donate_cpu_lib.py: add parameter capture_callstack
2022-01-02 22:16:00 +01:00
Paul Fultz II 01a8890d6d
Fix 9760: False positive: constParameter on parameter used to take non-const pointer via array decaying (#3660) 2022-01-02 08:15:38 +01:00
Paul Fultz II 71a44395c8
Fix 10659: FP knownConditionTrueFalse - C++17 structured binding (#3662) 2022-01-02 08:14:50 +01:00
KenPatrickLehrmann af289c8357
Handle (&foo)-> in isVariableChanged (#3624) 2022-01-02 08:14:10 +01:00
Armin Müller d5daba331f
Typos found by running "codespell" (#3659) 2022-01-02 08:12:08 +01:00
Paul Fultz II ccea1da33a
Add missing valueflow attributes to cppcheckdata.py (#3663) 2022-01-02 08:11:36 +01:00
Paul Fultz II 50862d1ace
Fix 10665: Crash in ExpressionAnalyzer (#3661) 2022-01-02 08:09:23 +01:00
Paul Fultz II 4b04c86249
Add regression for 9917: false positive: bitwiseOnBoolean when lhs is non-boolean (#3664) 2022-01-02 08:08:28 +01:00
Paul Fultz II 0c952ca05d
Fix 10223: ValueFlow; known value for a volatile variable (#3658) 2022-01-01 23:15:14 +01:00
Paul Fultz II 7bf0ca8d00
Fix 10672: crash: CheckAutoVariables (#3657) 2022-01-01 00:14:36 +01:00
chrchr-github 922e27de4c
Fix #7754 FP Same expression on both sides of '||' (#3635) 2021-12-31 08:24:05 +01:00
Claus Jensby Madsen d8c8487a98
Add build instructions for building with Visual Studio from the command line (#3655) 2021-12-25 12:20:05 +01:00
Rikard Falkeborn 8537331ad6
AutovarDeallocation: Fix grammar in error message (#3654) 2021-12-23 20:09:55 +01:00
Paul Fultz II d36aa590cd
Fix 10553: FP uninitvar with strcpy (#3652) 2021-12-23 08:22:41 +01:00
Daniel Marjamäki e6ccf299b9 Fixed #10598 (SymbolDatabase: final class is not parsed properly) 2021-12-22 21:48:01 +01:00
Daniel Marjamäki 4a7bc10f32 AUTHORS: Add clalancette 2021-12-22 19:03:47 +01:00
Chris Lalancette df1d6cf026
Fix the ability to recognize return types when simplifying attributes. (#3637)
* Fix the ability to recognize return types when simplifying attributes.

When parsing attributes to remove them, we have to allow for
the case where the return type of the function that follows
the attribute has a namespaced C++ type, like foo::bar .
That means that :: has to be recognized as a valid token.
Fix this in simplifyAttribute, and add tests for this as well.
2021-12-22 19:02:38 +01:00
Daniel Marjamäki 4d5ad5e42e triage: make it possible to copy selected results 2021-12-22 18:58:11 +01:00
Daniel Marjamäki 5491670792 Fixed #10528 (FP: misra-c2012-8.4) 2021-12-22 18:55:28 +01:00
chrchr-github 5a95ece15e
#10591: add TODO (#3647) 2021-12-21 10:24:38 +01:00
chrchr-github ca4e5ac527
Fix #7038 false negative for string argument in the CheckIO (#3649) 2021-12-20 17:22:39 +01:00
chrchr-github e6091cbe54
Add tests for #4647, #5979, #8763, #10101 (#3648) 2021-12-20 13:12:19 +01:00
Oliver Stöneberg 38de9214a8
small CheckStl optimization (#3645) 2021-12-20 07:29:45 +01:00
Paul Fultz II 73f24b43f9
Fix 10437: FP knownConditionTrueFalse after pointer check (#3646) 2021-12-20 07:28:40 +01:00
guillaume-uH57J9 a3560aaf5a
Better git usage in donate-cpu.py to reduce bandwidth and disk usage (#3584)
* Better git usage in donate-cpu.py to reduce bandwidth and disk usage

Main changes:
* Bump client version
* Move try+retry logic to function try_retry to reduce duplication
* Use exponential backoff for try_retry
* git clone with --depth=1 to reduce bandwidth and disk use
* Use multiple worktree to work with multiple versions, instead of back-and-forth checkouts

* donate-cpu.py fixes for review comments and automated check failures

* Move compile_cppcheck within (if ver == 'main) branch to avoid duplicate compile_cppcheck+compile_version cals
* Use classic format syntax for python 3.5 compatibility
* Fix undefined CalledProcessError detected by pylint

* donate-cpu.py code changes following code review

* Migration existing "cppcheck" directory if available instead of "git clone"
* Logging message tweaks
* Use subprocess' cwd parameter instead of os.chdir() to avoid risk around changing and not restoring the working directory

* Update tools/test-my-pr.py to account for donate_cpu_lib changes

* donate-cpu.py: ensure correct workspace locations with relative --work-path
2021-12-19 18:52:36 +01:00
orbitcowboy efd3aa47c5 Code formatting 2021-12-19 17:45:04 +01:00
orbitcowboy b2d81f0870 Ticket #8640: Added regression test 2021-12-19 17:43:32 +01:00
Daniel Marjamäki 0d7a3a8b26 dump; add 'noreturn' attribute for function calls 2021-12-19 15:32:33 +01:00
Paul Fultz II d69257e8cd
Fix 9740: FP accessMoved related to designated initialization (#3644) 2021-12-19 12:36:48 +01:00
Oliver Stöneberg cc24d6fcef
Fix #9162 (Invalid --project files do not give any error) (#3177) 2021-12-19 12:36:11 +01:00
chrchr-github bb327be8e8
Fix #10591 FP unusedStructMember with value-initialized struct and typedef (#3643) 2021-12-18 22:55:52 +01:00
chrchr-github 8df25ec4e9
Fix #8266 identicalConditionAfterEarlyExit variable modified in if-clause (#3610) 2021-12-18 22:52:54 +01:00
Oliver Stöneberg 0c3531ea61
CI-unixish.yml: added generated GUI files to self check and suppress known false positives for now (#3641) 2021-12-17 21:52:55 +01:00
Paul Fultz II 332f4c205a
Fix 9772: FP uninitvar: in cppcheck 2.1 (#3638) 2021-12-17 21:51:47 +01:00
Oliver Stöneberg c918e1bc50
added building of GUI tests to CMake (#3619) 2021-12-17 21:49:32 +01:00
Paul Fultz II e7db974606
Fix 10621: FP arrayIndexOutOfBoundsCond with multiple index checks (#3640) 2021-12-17 21:48:29 +01:00
Oliver Stöneberg ffae40d2f4
CI-unixish.yml: fixed syntax error (#3642) 2021-12-17 13:06:50 +01:00
Paul Fultz II 4fb43a3f56
Fix 10643: FP: (error) Array 'buf[64]' accessed at index -1, which is out of bounds. (#3639)
* Fix 10643: FP: (error) Array 'buf[64]' accessed at index -1, which is out of bounds.

* Format
2021-12-17 10:05:57 +01:00
Paul Fultz II 398fa28021
Fix 10657: False positive; ValueFlow - invalid iterator (#3636) 2021-12-16 22:34:51 +01:00
Paul Fultz II ac4f4258a0
Fix 10651: Crash on static template method (#3633) 2021-12-16 22:32:44 +01:00
chrchr-github e8260f2dcc
Improve fix for #9570: check if ternary operator is used in assignment to reference (#3614) 2021-12-16 22:32:15 +01:00
Daniel Marjamäki c02dd5bf23 bump simplecpp 2021-12-16 21:18:27 +01:00
Oliver Stöneberg 0e1590b43c
CI-unixish.yml: disabled GUI build on macos since Qt installation is flakey (#3634) 2021-12-16 17:45:34 +01:00
orbitcowboy 7bcedc20ab wxwidgets.cfg: Cleanup wrong arg config 2021-12-16 11:27:07 +01:00
orbitcowboy f845c9da79 wxwidgets.cfg: Added support for more interfaces 2021-12-16 11:20:33 +01:00
Daniel Marjamäki d0a84450d2 AUTHORS: Added afestini 2021-12-15 20:57:53 +01:00
afestini 0841e47075
Various changes (#3622)
* Various changes

-CSS grid layout
  -scrollbars
  -fixed header/footer
-severity filtering
-double escaped XML entities
-git blame fix and cmd line config
-"Toggle All" behavior

* Fixed table columns

Using visibility: collapse to hide entries without affecting
table/column width for more "stable" look when filtering

* Fix subprocess.check_output for Linux

* Filter by tool

Co-authored-by: afestini <afestini@gmail.com>
Co-authored-by: Alexander Festini <alexander.festini@technica-engineering.de>
2021-12-15 20:57:06 +01:00