[PATCH:bitmap] Use fputs instead of fprintf with no format arg to print usage message.

Dirk Wallenstein halsmit at t-online.de
Sat Jan 15 00:27:54 PST 2011


On Fri, Jan 14, 2011 at 02:08:15PM -0800, Alan Coopersmith wrote:
> Clear gcc warning of:
> BitEdit.c:986: warning: format not a string literal and no format arguments
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  BitEdit.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BitEdit.c b/BitEdit.c
> index cc1d640..20e4b8a 100644
> --- a/BitEdit.c
> +++ b/BitEdit.c
> @@ -51,7 +51,7 @@ from The Open Group.
>  
>  #include <X11/bitmaps/xlogo16>
>  
> -static char *usage = "[-options ...] filename\n\
> +static const char *usage = "[-options ...] filename\n\
>  \n\
>  where options include all standard toolkit options plus:\n\
>       -size WIDTHxHEIGHT\n\
> @@ -983,7 +983,7 @@ int main(int argc, char *argv[])
>  			      options, XtNumber(options), &argc, argv);
>  
>      if (argc > 2) {
> -	fprintf(stderr, usage);
> +	fputs(usage, stderr);
>  	exit (0);
>      }
>  
> -- 
> 1.7.3.2
> 

Reviewed-by: Dirk Wallenstein <halsmit at t-online.de>

-- 
Greetings,
Dirk


More information about the xorg-devel mailing list