From 748db5928c573fd699cd88f32fe21a456fa46d3e Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 20 Feb 2014 17:24:36 +0100 Subject: [PATCH] journal: fix compiler warning in journal_file_append_data() gcc (4.8.2, arm) does not understand that journal_file_append_field() will always set 'fo' when it returns 0, so this warning is bogus. Anyway, fix it by initialiting fo = NULL. --- src/journal/journal-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 3a081110b..23c4d28e7 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1012,8 +1012,8 @@ static int journal_file_append_data( else eq = memchr(data, '=', size); if (eq && eq > data) { + Object *fo = NULL; uint64_t fp; - Object *fo; /* Create field object ... */ r = journal_file_append_field(f, data, (uint8_t*) eq - (uint8_t*) data, &fo, &fp); -- 2.30.2