param_key: fix container of when no struct member is referenced
[smatch.git] / validation / Wuniv-init-ko.c
blob1fb5669f3713cc504628b3c2318ad3aecdacd62f
1 struct s {
2 void *ptr;
3 };
6 static struct s s = { 0 };
7 static int a = { 0 };
8 static int b = { };
9 static int c = { 1, 2 };
10 static struct s *ptr = { 0 };
12 struct o {
13 struct i {
14 int a;
18 static struct o o = { 0 };
21 * check-name: univ-init-ko
22 * check-command: sparse -Wuniversal-initializer $file
24 * check-error-start
25 Wuniv-init-ko.c:6:23: warning: Using plain integer as NULL pointer
26 Wuniv-init-ko.c:8:16: error: invalid initializer
27 Wuniv-init-ko.c:9:16: error: invalid initializer
28 Wuniv-init-ko.c:10:26: warning: Using plain integer as NULL pointer
29 Wuniv-init-ko.c:18:23: warning: missing braces around initializer
30 * check-error-end