[Pkg-lirc-maint] [PATCH 02/13] lircmd: fix FTBS with -Werror=format-security enabled

Stefan Lippers-Hollmann s.l-h at gmx.de
Fri Dec 12 23:00:05 UTC 2014


gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2  -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security  -c -o lircmd.o lircmd.c
lircmd.c: In function 'lircmd_parse_options':
lircmd.c:787:4: error: format not a string literal and no format arguments [-Werror=format-security]
    printf(help);
    ^

Signed-off-by: Stefan Lippers-Hollmann <s.l-h at gmx.de>
---
 daemons/lircmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemons/lircmd.c b/daemons/lircmd.c
index 023777c..3442f48 100644
--- a/daemons/lircmd.c
+++ b/daemons/lircmd.c
@@ -784,7 +784,7 @@ static void lircmd_parse_options(int argc,  char** const argv)
 	{
 		switch (c) {
 		case 'h':
-			printf(help);
+			printf("%s", help);
 			exit(EXIT_SUCCESS);
 		case 'v':
 			printf("lircmd %s\n",  VERSION);
-- 
2.1.3




More information about the Pkg-lirc-maint mailing list