libs/wpp: Avoid compiler warnings (-W)
Dan Hipschman
dsh at linux.ucla.edu
Sun Nov 4 17:58:55 CST 2007
On Sun, Nov 04, 2007 at 01:04:02PM +0100, Detlef Riekenberg wrote:
>
> Why is the code only used, when "WANT_NEAR_INDICATION" is defined?
> Should we remove the code or enable it always?
>
> @@ -591,18 +592,17 @@ static void generic_msg(const char *s, c
> fprintf(stderr, "%s:%d:%d: %s: ", pp_status.input ? pp_status.input : "stdin",
> pp_status.line_number, pp_status.char_number, t);
> vfprintf(stderr, s, ap);
> -#ifdef WANT_NEAR_INDICATION
> + if(n)
> {
> +#ifdef WANT_NEAR_INDICATION
> char *cpy, *p;
> - if(n)
> - {
> - cpy = pp_xstrdup(n);
> - for (p = cpy; *p; p++) if(!isprint(*p)) *p = ' ';
> - fprintf(stderr, " near '%s'", cpy);
> - free(cpy);
> - }
> - }
> +
> + cpy = pp_xstrdup(n);
> + for (p = cpy; *p; p++) if(!isprint(*p)) *p = ' ';
> + fprintf(stderr, " near '%s'", cpy);
> + free(cpy);
> #endif
> + }
> fprintf(stderr, "\n");
> }
>
Related, although not really a great solution:
http://www.winehq.org/pipermail/wine-cvs/2006-September/026094.html
I forget, are the extra "near" messages actually helpful, or misleading?
In any case, whatever ends up happening here should probably also happen
in widl, since it uses wpp and consistent warning/error messages are
nice.
More information about the wine-devel
mailing list