From 33ee50ddbdfb14ceab14d92bdeb9bb10ef522e0b Mon Sep 17 00:00:00 2001 From: Alexandre Montplaisir Date: Wed, 7 Dec 2011 10:36:10 -0500 Subject: [PATCH] Fix format string warnings Or `make check' fails when building with -Werror=format-security (which is what Launchpad uses). Signed-off-by: Alexandre Montplaisir Signed-off-by: Mathieu Desnoyers --- lttv/lttv/sync/event_processing_text.c | 10 +++++----- lttv/lttv/sync/sync_chain_unittest.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lttv/lttv/sync/event_processing_text.c b/lttv/lttv/sync/event_processing_text.c index bcbea9b2..a99d0e39 100644 --- a/lttv/lttv/sync/event_processing_text.c +++ b/lttv/lttv/sync/event_processing_text.c @@ -95,7 +95,7 @@ static void initProcessingText(SyncState* const syncState, ...) processingData->testCase= fopen(testCaseName, "r"); if (processingData->testCase == NULL) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } syncState->traceNb= readTraceNb(processingData->testCase); @@ -162,7 +162,7 @@ static AllFactors* finalizeProcessingText(SyncState* const syncState) if (retval == -1 && !feof(testCase)) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } if (line[retval - 1] == '\n') @@ -174,7 +174,7 @@ static AllFactors* finalizeProcessingText(SyncState* const syncState) &sendTime, &recvTime, &tmp); if (retval == EOF) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } else if (retval != 4) { @@ -311,7 +311,7 @@ static unsigned int readTraceNb(FILE* testCase) } else { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } } if (line[retval - 1] == '\n') @@ -365,7 +365,7 @@ static void skipCommentLines(FILE* testCase) } else { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } } } diff --git a/lttv/lttv/sync/sync_chain_unittest.c b/lttv/lttv/sync/sync_chain_unittest.c index 40302a0e..276c71ce 100644 --- a/lttv/lttv/sync/sync_chain_unittest.c +++ b/lttv/lttv/sync/sync_chain_unittest.c @@ -256,7 +256,7 @@ int main(const int argc, char* const argv[]) if (fclose(syncState->graphsStream) != 0) { - g_error(strerror(errno)); + g_error("%s", strerror(errno)); } } -- 2.34.1