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

Stefan Lippers-Hollmann s.l-h at gmx.de
Fri Dec 12 23:00:08 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 lirc-lsremotes.o lirc-lsremotes.c
lirc-lsremotes.c: In function 'main':
lirc-lsremotes.c:261:4: error: format not a string literal and no format arguments [-Werror=format-security]
    printf(USAGE);
    ^
lirc-lsremotes.c:280:3: error: format not a string literal and no format arguments [-Werror=format-security]
   fprintf(stderr, USAGE);
   ^

Signed-off-by: Stefan Lippers-Hollmann <s.l-h at gmx.de>
---
 tools/lirc-lsremotes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lirc-lsremotes.c b/tools/lirc-lsremotes.c
index 2ac7dad..6cddb19 100644
--- a/tools/lirc-lsremotes.c
+++ b/tools/lirc-lsremotes.c
@@ -258,7 +258,7 @@ int main(int argc, char** argv)
 			opt_silent = 1;
 			break;
 		case 'h':
-			printf(USAGE);
+			printf("%s", USAGE);
 			return (EXIT_SUCCESS);
 		case 'v':
 			printf("%s\n", "lirc-lsremotes " VERSION);
@@ -277,7 +277,7 @@ int main(int argc, char** argv)
 		dirpath = argv[optind];
 		configs = "*";
 	} else {
-		fprintf(stderr, USAGE);
+		fprintf(stderr, "%s", USAGE);
 		return EXIT_FAILURE;
 	}
 	lirc_log_get_clientlog("lirc-lsremotes", path, sizeof(path));
-- 
2.1.3




More information about the Pkg-lirc-maint mailing list