> 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?

Chris

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;
        }


-
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