From 3ce2538d18c6bad49bc1acfbe41375fc54f3e0ad Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Wed, 18 May 2005 23:29:41 +0200 Subject: [PATCH] [PATCH] Fix segfault on non-ANSI function-like declaration for real The fix by Linus was half-assed, since it wasn't *p that was NULL, but 'p' itself. Fix it for real this time. Signed-off-by: Luc Van Oostenryck Signed-off-by: Linus Torvalds --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.c b/parse.c index eb9773ef..183c2d62 100644 --- a/parse.c +++ b/parse.c @@ -1354,7 +1354,7 @@ static struct token *parameter_type_list(struct token *token, struct symbol *fn, if (match_op(token, ')')) { // No warning for "void oink ();" // Bug or feature: warns for "void oink () __attribute__ ((noreturn));" - if (*p && !match_op(token->next, ';')) + if (p && !match_op(token->next, ';')) warning(token->pos, "non-ANSI function declaration of function '%s'", show_ident(*p)); return token; } -- 2.11.4.GIT