cppcheck/test
Anton Lindqvist 3d6c453058
Fix uninitvar false positive in designed initializers ()
Stop interpreting struct fields in designed initializers as usage of local
variables which can happen if they share the same name.

```
$ cat test.c
struct a { int b; };
int main() {
  char *b;
  extern int foo(struct a *);
  return foo(&(struct a){.b = 0});
}
$ cppcheck --quiet test.c
test.c:5:27: error: Uninitialized variable: b [legacyUninitvar]
  return foo(&(struct a){.b = 0});
```
2023-05-26 11:59:10 +02:00
..
cfg Fix FN constVariablePointer () 2023-05-22 19:53:51 +02:00
cli FP unusedFunction with templates and --cppcheck-build-dir () 2023-05-26 06:13:48 +02:00
CMakeLists.txt use `ccache` for sanitizer builds / do not use precompiled headers with `ccache` () 2023-04-01 09:40:10 +02:00
fixture.cpp testrunner: even more `SettingsBuilder` usage and `const` cleanups () 2023-05-04 10:31:05 +02:00
fixture.h testrunner: even more `SettingsBuilder` usage and `const` cleanups () 2023-05-04 10:31:05 +02:00
helpers.cpp SingleExecutor: process markup files after code when scanning projects () 2023-05-03 17:32:28 +02:00
helpers.h reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
main.cpp extracted single job execution into `SingleExecutor` / improved testing / do not unconditionally apply colors to output () 2023-04-08 18:06:38 +02:00
options.cpp Update copyright year 2023-01-28 10:16:34 +01:00
options.h Update Copyrights 2022-08-28 14:22:12 +02:00
precompiled.h cleaned up includes based on `include-what-you-use` () 2023-03-02 21:50:14 +01:00
redirect.h simplified `ThreadExecutor` class by moving some code out of it / fixed some thread safety issues () 2023-03-04 12:05:17 +01:00
test64bit.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testanalyzerinformation.cpp Update copyright year 2023-01-28 10:16:34 +01:00
testassert.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testastutils.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testautovariables.cpp Fix false negative: autoVariables [inconclusive] (regression) () 2023-05-13 14:11:01 +02:00
testbool.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testboost.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testbufferoverrun.cpp Fix internal error: converting '1f' to integer failed () 2023-05-18 23:26:56 +02:00
testcharvar.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testclangimport.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testclass.cpp Partial fix for FN functionConst with non-dereferenceable pointer access () 2023-05-21 14:00:24 +02:00
testcmdlineparser.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testcolor.cpp optimized template string substitutions a bit () 2023-04-08 22:19:52 +02:00
testcondition.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testconstructors.cpp Fixed (FP overlappingWriteUnion with anonymous struct in union) () 2023-05-20 10:34:42 +02:00
testcppcheck.cpp cleaned up includes based on `include-what-you-use` () 2023-04-30 07:33:19 +02:00
testerrorlogger.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testexceptionsafety.cpp testrunner: even more `SettingsBuilder` usage and `const` cleanups () 2023-05-04 10:31:05 +02:00
testfilelister.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testfunctions.cpp Fix "this->" confuses non void return check () 2023-05-22 20:23:09 +02:00
testgarbage.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testimportproject.cpp iwyu.yml: use a distro which has the latest `include-what-you-use` / enabled Qt mappings / cleaned up includes () 2023-04-08 16:08:47 +02:00
testincompletestatement.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testinternal.cpp cleaned up includes based on `include-what-you-use` () 2023-03-02 21:50:14 +01:00
testio.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testleakautovar.cpp Fix FN (error) Memory leak - assignment to reference of a pointer () 2023-05-23 06:29:20 +02:00
testlibrary.cpp testrunner: even more `SettingsBuilder` usage and `const` cleanups () 2023-05-04 10:31:05 +02:00
testmathlib.cpp iwyu.yml: use a distro which has the latest `include-what-you-use` / enabled Qt mappings / cleaned up includes () 2023-04-08 16:08:47 +02:00
testmemleak.cpp Fix FN unused variable not detected when there is lambda () 2023-05-22 07:39:57 +02:00
testnullpointer.cpp Add tests for , () 2023-05-04 20:35:56 +02:00
testoptions.cpp Update copyright year 2023-01-28 10:16:34 +01:00
testother.cpp Fix FN constVariablePointer () 2023-05-22 19:53:51 +02:00
testpath.cpp Use path to executable when trying to load library () 2023-05-26 06:55:36 +02:00
testpathmatch.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testplatform.cpp made `Platform` a member of `Settings` instead of inheriting from it / cleanups () 2023-03-03 18:36:27 +01:00
testpostfixoperator.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testpreprocessor.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testprocessexecutor.cpp SingleExecutor: process markup files after code when scanning projects () 2023-05-03 17:32:28 +02:00
testrunner.vcxproj moved more code into `HAVE_RULES` () 2023-05-04 10:54:19 +02:00
testrunner.vcxproj.filters moved more code into `HAVE_RULES` () 2023-05-04 10:54:19 +02:00
testsettings.cpp Update copyright year 2023-01-28 10:16:34 +01:00
testsimplifytemplate.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testsimplifytokens.cpp Fixed (FP overlappingWriteUnion with anonymous struct in union) () 2023-05-20 10:34:42 +02:00
testsimplifytypedef.cpp Fix FP constStatement with nested typedefs () 2023-05-26 06:12:40 +02:00
testsimplifyusing.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testsingleexecutor.cpp SingleExecutor: process markup files after code when scanning projects () 2023-05-03 17:32:28 +02:00
testsizeof.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
teststl.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
teststring.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testsummaries.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testsuppressions.cpp Suppressions: some cleanups () 2023-05-04 18:15:18 +02:00
testsymboldatabase.cpp Improved handling of alignas. alignas will not be removed from now on so we don't loose this information. () 2023-05-24 10:33:53 +02:00
testthreadexecutor.cpp SingleExecutor: process markup files after code when scanning projects () 2023-05-03 17:32:28 +02:00
testtimer.cpp Update copyright year 2023-01-28 10:16:34 +01:00
testtoken.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testtokenize.cpp Fixed (FP overlappingWriteUnion with anonymous struct in union) () 2023-05-20 10:34:42 +02:00
testtokenlist.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testtokenrange.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testtype.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testuninitvar.cpp Fix uninitvar false positive in designed initializers () 2023-05-26 11:59:10 +02:00
testunusedfunctions.cpp Partial fix for False positives with function pointers () 2023-05-14 12:16:17 +02:00
testunusedprivfunc.cpp testrunner: more `SettingsBuilder` usage and `const` cleanups () 2023-05-02 15:54:19 +02:00
testunusedvar.cpp Fix FP unreadVariable with brace-init () 2023-05-23 20:21:02 +02:00
testutils.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testvaarg.cpp reduced usage of mutable `Settings` objects in tests () 2023-05-02 11:48:24 +02:00
testvalueflow.cpp Set values when assigning init list () 2023-05-14 17:01:07 +02:00
testvarid.cpp Improved handling of alignas. alignas will not be removed from now on so we don't loose this information. () 2023-05-24 10:33:53 +02:00