From 2c3f72d038fa932b7a48454a0e1fc9af85540a76 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 18 May 2015 23:27:57 +0200 Subject: rsparms: 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/rose' 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 rsparms.o -MD -MP -MF .deps/rsparms.Tpo -c -o rsparms.o rsparms.c rsparms.c: In function ‘nodes’: rsparms.c:71:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, nodes_usage); ^ rsparms.c:117:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, nodes_usage); ^ cc1: some warnings being treated as errors Makefile:462: recipe for target 'rsparms.o' failed make[2]: *** [rsparms.o] Error 1 make[2]: Leaving directory '/home/ralf/src/ax25/ax25-tools/rose' The string is a constant in the application code itself so no security issue Signed-off-by: Ralf Baechle --- rose/rsparms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rose/rsparms.c b/rose/rsparms.c index e9266aa..fd38711 100644 --- a/rose/rsparms.c +++ b/rose/rsparms.c @@ -68,7 +68,7 @@ void nodes(int s, int argc, char *argv[]) int args; if (argc < 3) { - fprintf(stderr, nodes_usage); + fprintf(stderr, "%s", nodes_usage); exit(1); } @@ -114,7 +114,7 @@ void nodes(int s, int argc, char *argv[]) } if (argc < 6) { - fprintf(stderr, nodes_usage); + fprintf(stderr, "%s", nodes_usage); exit(1); } -- cgit v1.2.3