[CRIU][PATCH] zdtm: It's need add format to fprintf

vkonyashkin vkonyashkin at parallels.com
Mon Oct 1 08:56:31 EDT 2012


It's need add format to fprintf to avoid following error in Ubuntu 12.04:
msg.c:59:2: error: format not a string literal and no format arguments [-Werror=format-security]

Signed-off-by: Victor Konyashkin  <vkonyashkin at parallels.com>
---
 test/zdtm/lib/msg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/zdtm/lib/msg.c b/test/zdtm/lib/msg.c
index 17a298e..8a80ae2 100644
--- a/test/zdtm/lib/msg.c
+++ b/test/zdtm/lib/msg.c
@@ -56,5 +56,5 @@ void test_msg(const char *format, ...)
 	off += vsnprintf(buf + off, sizeof(buf) - off, format, arg);
 	va_end(arg);
 
-	fprintf(stderr, buf);
+	fprintf(stderr, "%s", buf);
 }
-- 
1.5.2.2



More information about the CRIU mailing list