aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2009-03-09 07:10:48 +0000
committerChristopher Li <sparse@chrisli.org>2009-07-17 23:06:23 +0000
commit09e5867415798fb927b9da830b7dbe908d941596 (patch)
treee949a198b62c2b8b3f132ec5042647346267d2ff /validation
parentFix braino in which_kind() (diff)
downloadsparse-09e5867415798fb927b9da830b7dbe908d941596.tar.gz
sparse-09e5867415798fb927b9da830b7dbe908d941596.tar.bz2
sparse-09e5867415798fb927b9da830b7dbe908d941596.zip
Sanitize direct_declarator logics
a) handling of nested declarator does not belong in the loop, for fsck sake b) functions and arrays don't mix (and functions don't mix with functions) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
-rw-r--r--validation/nested-declarator.c16
-rw-r--r--validation/nested-declarator2.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/validation/nested-declarator.c b/validation/nested-declarator.c
index 62c4940..1efe20c 100644
--- a/validation/nested-declarator.c
+++ b/validation/nested-declarator.c
@@ -16,12 +16,14 @@ int j(int [2](*));
/*
* check-name: nested declarator vs. parameters
* check-error-start:
-nested-declarator.c:11:29: warning: missing identifier in declaration
-nested-declarator.c:13:16: error: Expected ) in function declarator
-nested-declarator.c:13:16: error: got *
-nested-declarator.c:14:19: error: Expected ) in function declarator
-nested-declarator.c:14:19: error: got *
-nested-declarator.c:15:15: error: Expected ) in function declarator
-nested-declarator.c:15:15: error: got *
+nested-declarator.c:11:23: warning: missing identifier in declaration
+nested-declarator.c:11:23: error: Expected ; at the end of type declaration
+nested-declarator.c:11:23: error: got (
+nested-declarator.c:13:15: error: Expected ; at the end of type declaration
+nested-declarator.c:13:15: error: got (
+nested-declarator.c:14:18: error: Expected ) in function declarator
+nested-declarator.c:14:18: error: got (
+nested-declarator.c:15:14: error: Expected ) in function declarator
+nested-declarator.c:15:14: error: got (
* check-error-end:
*/
diff --git a/validation/nested-declarator2.c b/validation/nested-declarator2.c
index 795d01f..cd22853 100644
--- a/validation/nested-declarator2.c
+++ b/validation/nested-declarator2.c
@@ -32,11 +32,9 @@ nested-declarator2.c:17:1: warning: non-ANSI definition of function 'w1'
nested-declarator2.c:21:21: warning: non-ANSI function declaration of function '<noident>'
nested-declarator2.c:22:16: warning: variadic functions must have one named argument
nested-declarator2.c:24:21: warning: identifier list not in definition
-nested-declarator2.c:25:44: error: Expected ) in function declarator
-nested-declarator2.c:25:44: error: got x
nested-declarator2.c:26:13: error: Expected ) in nested declarator
nested-declarator2.c:26:13: error: got -
-nested-declarator2.c:27:17: error: Expected ) in function declarator
-nested-declarator2.c:27:17: error: got *
+nested-declarator2.c:27:16: error: Expected ; at the end of type declaration
+nested-declarator2.c:27:16: error: got (
* check-error-end:
*/