Anton Lindqvist 3d6c453058
Fix uninitvar false positive in designed initializers (#5079)
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
..
2022-02-05 11:45:17 +01:00
2022-05-21 12:18:27 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2022-05-21 12:18:27 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2022-02-05 11:45:17 +01:00
2022-05-21 12:18:27 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2022-02-05 11:45:17 +01:00
2022-05-21 12:18:27 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2022-05-21 12:18:27 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2021-09-26 11:34:56 +02:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00
2021-08-07 20:51:18 +02:00
2023-01-28 10:16:34 +01:00
2023-01-29 15:18:22 +01:00
2023-01-28 10:16:34 +01:00
2023-01-28 10:16:34 +01:00