On Tue, 9 Sep 2003, Warren Turkal wrote:

> Here is a patch ansifying xwininfo.c. I diffed the executable after the
> changes to the executable from before the changes, and they were the same.
>
> Index: xwininfo.c
> ===================================================================
> RCS file: /cvs/xc/programs/xwininfo/xwininfo.c,v
> retrieving revision 1.8
> diff -u -3 -p -r1.8 xwininfo.c
> --- xwininfo.c  14 Dec 2001 20:02:35 -0000      1.8
> +++ xwininfo.c  9 Sep 2003 15:17:24 -0000
> @@ -58,28 +58,26 @@ typedef struct {
>         char *name;
>  } binding;
>
> -#if NeedFunctionPrototypes
> -extern void scale_init(void);
> -extern char *nscale(int, int, int, char *);

while I'm perfectly aware that "extern" is redundant, there are two things
to be said in favor of keeping it:

a) it's easy to grep for

b) some compilers silently ignore conflicts with a "static" definition of
   the prototype, but can be persuaded to warn if the extern is explicit.
   (gcc does this, making it unsuitable as the only compiler to use for
   testing).

also - "extern" prototypes really should be moved to a header file,
otherwise they're not effective at flagging mismatches between different
files..

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to