From dd0d3357cb268bbd9ca341b56cd83ec71df01518 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 18 May 2015 23:16:35 +0200 Subject: axparms: Fix harmless -Werror=format-security build error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 axparms.o -MD -MP -MF .deps/axparms.Tpo -c -o axparms.o axparms.c axparms.c: In function ‘routes’: axparms.c:142:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(routebuf); ^ axparms.c: In function ‘associate’: axparms.c:189:3: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 80, fp); ^ cc1: some warnings being treated as errors Makefile:570: recipe for target 'axparms.o' failed make[3]: *** [axparms.o] Error 1 Note that routebuf has been read from /procfs so should be safe. Signed-off-by: Ralf Baechle --- ax25/axparms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ax25') diff --git a/ax25/axparms.c b/ax25/axparms.c index 71724f7..a3795e3 100644 --- a/ax25/axparms.c +++ b/ax25/axparms.c @@ -139,7 +139,7 @@ PROC_AX25_ROUTE_FILE); return 1; } while (fgets(routebuf,80,fp)) - printf(routebuf); + printf("%s", routebuf); puts(""); } -- cgit v1.2.3