aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/init_cstring.c
blob: bac814e4290786198df57891589319283fe368ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
static struct alpha {
  char a[2];
} x = { .a = "ab" };
static const char str[2] = "abc";
/*
 * check-name: -Winit-cstring option
 *
 * check-command: sparse -Winit-cstring $file
 * check-error-start
init_cstring.c:3:14: warning: too long initializer-string for array of char(no space for nul char)
init_cstring.c:4:28: warning: too long initializer-string for array of char
 * check-error-end
 */