1struct s { 2 void *ptr; 3}; 4 5 6static struct s s = { 0 }; 7static int a = { 0 }; 8static int b = { }; 9static int c = { 1, 2 }; 10static struct s *ptr = { 0 }; 11 12struct o { 13 struct i { 14 int a; 15 }; 16}; 17 18static struct o o = { 0 }; 19 20/* 21 * check-name: univ-init-ko 22 * check-command: sparse -Wuniversal-initializer $file 23 * 24 * check-error-start 25Wuniv-init-ko.c:6:23: warning: Using plain integer as NULL pointer 26Wuniv-init-ko.c:8:16: error: invalid initializer 27Wuniv-init-ko.c:9:16: error: invalid initializer 28Wuniv-init-ko.c:10:26: warning: Using plain integer as NULL pointer 29Wuniv-init-ko.c:18:23: warning: missing braces around initializer 30 * check-error-end 31 */ 32