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

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jan 14 14:08:15 PST 2011


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



More information about the xorg-devel mailing list