chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a002d44
)
journal: fix compiler warning in journal_file_append_data()
author
Daniel Mack
<zonque@gmail.com>
Thu, 20 Feb 2014 16:24:36 +0000
(17:24 +0100)
committer
Daniel Mack
<zonque@gmail.com>
Thu, 20 Feb 2014 16:24:36 +0000
(17:24 +0100)
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
patch
|
blob
|
history
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index 3a081110b98a74cccebe6fb303302b0d02e22eb5..23c4d28e730482ff715085beb6bfe03338c61510 100644
(file)
--- 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);