From bcaf37adf6ee05abd9f30a56973d77fecd663ed5 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 18 May 2015 23:23:54 +0200 Subject: m6pack: Fix harmless -Werror=format-security build error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/6pack' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT m6pack.o -MD -MP -MF .deps/m6pack.Tpo -c -o m6pack.o m6pack.c m6pack.c: In function ‘main’: m6pack.c:446:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ m6pack.c:452:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ m6pack.c:457:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ cc1: some warnings being treated as errors Makefile:384: recipe for target 'm6pack.o' failed make[2]: *** [m6pack.o] Error 1 make[2]: Leaving directory '/home/ralf/src/ax25/ax25-tools/6pack' The string are constants in the application code itself so no security issue. Signed-off-by: Ralf Baechle --- 6pack/m6pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/6pack/m6pack.c b/6pack/m6pack.c index e698ef3..5b63801 100644 --- a/6pack/m6pack.c +++ b/6pack/m6pack.c @@ -443,18 +443,18 @@ int main(int argc, char *argv[]) return 1; case ':': case '?': - fprintf(stderr, usage_string); + fprintf(stderr, "%s", usage_string); return 1; } } if ((argc - optind) < 2 && ptmxdevices == 0) { - fprintf(stderr, usage_string); + fprintf(stderr, "%s", usage_string); return 1; } if ((argc - optind) < 1 && ptmxdevices > 0) { - fprintf(stderr, usage_string); + fprintf(stderr, "%s", usage_string); return 1; } -- cgit v1.2.3