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

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


gcc -DHAVE_CONFIG_H -I. -I..  -I../lib -I..  -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2  -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security  -c -o mode2.o mode2.c
mode2.c: In function 'parse_options':
mode2.c:98: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>
---
 tools/mode2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mode2.c b/tools/mode2.c
index c055a5e..769ff5c 100644
--- a/tools/mode2.c
+++ b/tools/mode2.c
@@ -95,7 +95,7 @@ static void parse_options(int argc, char** argv)
 	{
 		switch (c) {
 		case 'h':
-			printf(help);
+			printf("%s", help);
 			exit(EXIT_SUCCESS);
 		case 'H':
 			if (hw_choose_driver(optarg) != 0) {
-- 
2.1.3




More information about the Pkg-lirc-maint mailing list