summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-02-20 17:24:36 +0100
committerDaniel Mack <zonque@gmail.com>2014-02-20 17:24:36 +0100
commit748db5928c573fd699cd88f32fe21a456fa46d3e (patch)
treee875be935b52d4fe5ecffd18a497c74607a3dc40
parenta002d44b008acd309987c37eb48009e3125a532c (diff)
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.
-rw-r--r--src/journal/journal-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 3a081110b9..23c4d28e73 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);