powerpc-utils/powerpc-utils-errinjct-Add-format-specificer.patch
Vasant Hegde 54545999fd Fix build warnings
Also commit source file.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2015-11-16 19:04:56 +05:30

35 lines
1009 B
Diff

From 484a8539fa4b4b677a0e496f8e41ba5f8da40b02 Mon Sep 17 00:00:00 2001
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date: Mon, 16 Nov 2015 18:51:24 +0530
Subject: [PATCH] errinjct: Add format specificer
We hit below build warning with "-Werror=format-security" compilation option.
CC src/errinjct/icache.o
src/errinjct/errinjct.c: In function 'perr':
src/errinjct/errinjct.c:240:18: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, buf);
^
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
src/errinjct/errinjct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/errinjct/errinjct.c b/src/errinjct/errinjct.c
index 509f8e8..7133cca 100644
--- a/src/errinjct/errinjct.c
+++ b/src/errinjct/errinjct.c
@@ -237,7 +237,7 @@ void perr(int error, const char *fmt, ...)
buf[len] = '\0';
- fprintf(stderr, buf);
+ fprintf(stderr, "%s\n", buf);
fflush(stderr);
}
--
2.1.0