lkml.org 
[lkml]   [2003]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: sparse errors

On Wed, 28 May 2003, Ryan Anderson wrote:
>
> Some symbols with type SYM_NODE are getting ctype->base_type==NULL,
> causing a segfault in type_difference:422.

Fixed like this, causing the proper warning..

Linus

---
# This is a BitKeeper generated patch for the following project:
# Project Name: TSCT - The Silly C Tokenizer
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.345 -> 1.346
# parse.c 1.97 -> 1.98
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/28 torvalds@home.transmeta.com 1.346
# Check whether a parameter declaration is a type before trying
# to parse it as a type.
# --------------------------------------------
#
diff -Nru a/parse.c b/parse.c
--- a/parse.c Wed May 28 07:38:53 2003
+++ b/parse.c Wed May 28 07:38:53 2003
@@ -886,6 +886,10 @@
break;
}

+ if (!lookup_type(token)) {
+ warn(token->pos, "non-ANSI parameter list");
+ break;
+ }
token = parameter_declaration(token, &sym);
/* Special case: (void) */
if (!*list && !sym->ident && sym->ctype.base_type == &void_ctype)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [from the cache]
©2003-2011 Jasper Spaans