From f69b3b9af78c94b5ce56a73e086b22b585ea5c85 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 14 May 2010 10:37:37 -0700 Subject: [PATCH] Get rid of warnings when compiled with -Wformat-security Change-Id: I27e0819aba347e26051ad771c594b69700da1721 --- logwrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logwrapper.c b/logwrapper.c index afc6cdb..4862efb 100644 --- a/logwrapper.c +++ b/logwrapper.c @@ -51,7 +51,7 @@ int parent(const char *tag, int parent_read) { if (a == 0 && b == sizeof(buffer) - 1) { // buffer is full, flush buffer[b] = '\0'; - LOG(LOG_INFO, tag, &buffer[a]); + LOG(LOG_INFO, tag, "%s", &buffer[a]); b = 0; } else if (a != b) { // Keep left-overs @@ -67,7 +67,7 @@ int parent(const char *tag, int parent_read) { // Flush remaining data if (a != b) { buffer[b] = '\0'; - LOG(LOG_INFO, tag, &buffer[a]); + LOG(LOG_INFO, tag, "%s", &buffer[a]); } status = 0xAAAA; if (wait(&status) != -1) { // Wait for child