File: init_cstring.c

package info (click to toggle)
sparse 0.6.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,868 kB
  • sloc: ansic: 46,050; sh: 614; python: 301; perl: 293; makefile: 279
file content (13 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (3)
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
 */