param_key: use get_name_sym_from_key() instead of return_state_to_var_sym()
[smatch.git] / validation / Wuniv-init-ok.c
blob1f0c3dcb0c02c0c840e3489e9ed36f8a243d1515
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-ok
22 * check-command: sparse -Wno-universal-initializer $file
24 * check-error-start
25 Wuniv-init-ok.c:8:16: error: invalid initializer
26 Wuniv-init-ok.c:9:16: error: invalid initializer
27 Wuniv-init-ok.c:10:26: warning: Using plain integer as NULL pointer
28 * check-error-end