[systemd-devel] [PATCH] coredump: suppress uninitialized sz warning

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Wed Jul 23 05:26:17 PDT 2014


On Wed, Jul 23, 2014 at 10:02:57AM +0200, Daniel Buch wrote:
> Its false positive but lets make gcc happy
We have approximately a million of those... If you compile with -O2 or -O3 they
really multiply. I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846,
so let's wait for the upstream response before applying such patches.

Zbyszek

> diff --git a/src/journal/coredump.c b/src/journal/coredump.c
> index 182c2b1..a361a51 100644
> --- a/src/journal/coredump.c
> +++ b/src/journal/coredump.c
> @@ -700,7 +700,7 @@ log:
>          /* Optionally store the entire coredump in the journal */
>          if (IN_SET(arg_storage, COREDUMP_STORAGE_JOURNAL, COREDUMP_STORAGE_BOTH) &&
>              coredump_size <= (off_t) arg_journal_size_max) {
> -                size_t sz;
> +                size_t sz = 0;


More information about the systemd-devel mailing list