xfs
[Top] [All Lists]

xfsprogs: fix warning in libxcmd/input.c

To: xfs@xxxxxxxxxxx
Subject: xfsprogs: fix warning in libxcmd/input.c
From: Ben Myers <bpm@xxxxxxx>
Date: Fri, 1 Feb 2013 15:36:49 -0600
Cc: Arkadiusz MiÅkiewicz <arekm@xxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Fix an error when building with -Werror=format-security.

input.c: In function 'fetchline':
input.c:91:2: error: format not a string literal and no format arguments 
[-Werror=format-security]

Signed-off-by: Ben Myers <bpm@xxxxxxx>
Reported by: Arkadiusz MiÅkiewicz <arekm@xxxxxxxx>
Index: xfsprogs/libxcmd/input.c
===================================================================
--- xfsprogs.orig/libxcmd/input.c       2013-02-01 15:29:47.069894522 -0600
+++ xfsprogs/libxcmd/input.c    2013-02-01 15:30:00.845895188 -0600
@@ -88,7 +88,7 @@
 
        if (!line)
                return NULL;
-       printf(get_prompt());
+       printf("%s", get_prompt());
        fflush(stdout);
        if (!fgets(line, MAXREADLINESZ, stdin)) {
                free(line);

<Prev in Thread] Current Thread [Next in Thread>