diff options
| author | Josh Triplett <josh@freedesktop.org> | 2007-07-22 20:58:27 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@freedesktop.org> | 2007-07-22 20:58:27 -0700 |
| commit | 10ef6a2b52838dc3d27c6910b03f07d057343df0 (patch) | |
| tree | 6ff243672ac6ff7b38866210d6ed764414c7d0dc /validation | |
| parent | 86eb97a3c2df4026afba11a677042326848bbe78 (diff) | |
| download | sparse-dev-10ef6a2b52838dc3d27c6910b03f07d057343df0.tar.gz | |
Add test-suite metadata to old-initializer.c; also test with -Wno-initializer
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/old-initializer-nowarn.c | 9 | ||||
| -rw-r--r-- | validation/old-initializer.c | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/validation/old-initializer-nowarn.c b/validation/old-initializer-nowarn.c new file mode 100644 index 00000000..4efe00d7 --- /dev/null +++ b/validation/old-initializer-nowarn.c @@ -0,0 +1,9 @@ +struct s { + int i; +}; + +static struct s the_s = { i: 1 }; +/* + * check-name: Old initializer with -Wno-old-initializer + * check-command: sparse -Wno-old-initializer + */ diff --git a/validation/old-initializer.c b/validation/old-initializer.c index 5ae85161..48aeeaab 100644 --- a/validation/old-initializer.c +++ b/validation/old-initializer.c @@ -3,3 +3,10 @@ struct s { }; static struct s the_s = { i: 1 }; +/* + * check-name: Old initializer + * + * check-error-start +old-initializer.c:5:27: warning: obsolete struct initializer, use C99 syntax + * check-error-end + */ |
