summaryrefslogtreecommitdiffstats
path: root/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-05-18 23:16:35 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-05-18 23:16:35 +0200
commitdd0d3357cb268bbd9ca341b56cd83ec71df01518 (patch)
treec4fd9510f896f486be93cd9d05e81a178907fda5 /ax25
parent5c0c7e4390d3a08ac2521234a72fb962c2c4fcfd (diff)
axparms: Fix harmless -Werror=format-security build error.
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 <ralf@linux-mips.org>
Diffstat (limited to 'ax25')
-rw-r--r--ax25/axparms.c2
1 files changed, 1 insertions, 1 deletions
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("");
}