tools/fnt2bdf: fix a few compiler warnings (1/10)

Michael Stefaniuc mstefani at redhat.com
Wed Nov 12 03:28:37 CST 2008


Austin English wrote:
> This series of patches fixes most of the new warnings generated in gcc
> 4.3.2. There's one issue left, but I'm not quite sure what should be
> done on that one.
> diff --git a/tools/fnt2bdf.c b/tools/fnt2bdf.c
> index 1a14d6c..3c3134b 100644
> --- a/tools/fnt2bdf.c
> +++ b/tools/fnt2bdf.c
> @@ -595,14 +595,14 @@ int main(int argc, char **argv)
>
> 		    if( !(lpfont = (unsigned char*) realloc( lpfont, length )) )
> 		    {
>-			fprintf(stderr, errorMemory );
>+			fprintf(stderr, "%s", errorMemory );
Ugly. You could just use fputs instead.

But if you know that the passed in strings are safe aka no format
specifiers in them you can leave the code as is as the compiler warning
is bogus.

> 			exit(1);
> 		    }

bye
	michael



More information about the wine-devel mailing list