Fix format string warnings
authorAlexandre Montplaisir <alexandre.montplaisir@gmail.com>
Wed, 7 Dec 2011 15:36:10 +0000 (10:36 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Dec 2011 15:36:10 +0000 (10:36 -0500)
Or `make check' fails when building with -Werror=format-security
(which is what Launchpad uses).

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttv/lttv/sync/event_processing_text.c
lttv/lttv/sync/sync_chain_unittest.c

index bcbea9b2565a24e73b044318dfc6aae352d1d144..a99d0e3934d45dd0b0c8a132a77d3c393692fb43 100644 (file)
@@ -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));
                                }
                        }
                }
index 40302a0e41183e6dfc20d4c138714763386cfa36..276c71ce2d4b80396016a3f402cfcd29f44e76a5 100644 (file)
@@ -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));
                }
        }
 
This page took 0.025384 seconds and 4 git commands to generate.