From 39883f622f392d8579f4428fc5a789a102efbb10 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 19 Feb 2014 17:47:11 +0100 Subject: make gcc shut up If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter. --- src/journal/journal-gatewayd.c | 4 ++-- src/journal/journalctl.c | 2 +- src/journal/sd-journal.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/journal') diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c index 5c35d8e77e..7e97a3588c 100644 --- a/src/journal/journal-gatewayd.c +++ b/src/journal/journal-gatewayd.c @@ -744,7 +744,7 @@ static int request_handler_file( static int get_virtualization(char **v) { _cleanup_bus_unref_ sd_bus *bus = NULL; - char *b; + char *b = NULL; int r; r = sd_bus_default_system(&bus); @@ -780,7 +780,7 @@ static int request_handler_machine( RequestMeta *m = connection_cls; int r; _cleanup_free_ char* hostname = NULL, *os_name = NULL; - uint64_t cutoff_from, cutoff_to, usage; + uint64_t cutoff_from = 0, cutoff_to = 0, usage; char *json; sd_id128_t mid, bid; _cleanup_free_ char *v = NULL; diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index d406daeae9..a328ba11b0 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1651,7 +1651,7 @@ int main(int argc, char *argv[]) { } if (arg_action == ACTION_DISK_USAGE) { - uint64_t bytes; + uint64_t bytes = 0; char sbytes[FORMAT_BYTES_MAX]; r = sd_journal_get_usage(j, &bytes); diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 6abbacf004..fa2009c5dc 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1281,7 +1281,7 @@ static bool file_type_wanted(int flags, const char *filename) { } static int add_any_file(sd_journal *j, const char *path) { - JournalFile *f; + JournalFile *f = NULL; int r; assert(j); -- cgit v1.2.3-54-g00ecf