Christopher Li wrote:
while trying to run sparse on the Wine sources I got a segfault which
can be reproduced with following code:

int (*oink)() = (void *)0;



I believe the following patch should fix the problem. Sparse is about to complain the function is non-ANSI declaration.

Can you give it a try?
I know that works, I used an analog patch to keep going, but is this the correct fix or only a quick workaround?

Index: sparse/parse.c
===================================================================
--- sparse.orig/parse.c 2005-04-11 16:15:52.000000000 -0400
+++ sparse/parse.c      2005-04-14 21:15:36.000000000 -0400
@@ -1355,7 +1355,7 @@
                // No warning for "void oink ();"
                // Bug or feature: warns for "void oink () __attribute__ 
((noreturn));"
                if (!match_op(token->next, ';'))
-                       warning(token->pos, "non-ANSI function declaration of 
function '%s'", show_ident(*p));
+                       warning(token->pos, "non-ANSI function declaration of 
function '%s'", show_ident(p ? *p : NULL));
                return token;
        }

bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 Sr. Network Engineer Fax.: +49-711-96437-111 Red Hat GmbH Email: [EMAIL PROTECTED] Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart

-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to