Re: linux-next: build warning after merge of the char-misc tree

From: Arnd Bergmann
Date: Fri Mar 01 2013 - 12:17:35 EST


On Friday 01 March 2013, Sedat Dilek wrote:
> I have seen a lot of such failures when using the Freetz (a small
> router project) build-system with gcc-4.7-x where "-Os" is default
> optimization-level.
>
> Last, when I tried to integrate ltrace GIT snapshots into Freetz.
> All these "build-errors" could be solved in changing ltrace code.
> So, I would not talk about "false positives".

But the point is that we should not be changing the source code to
unnecessary initializations, because that may hide real bugs if the
code is modified in a way that relies on a sane value of some
variable. They are false positives if the code is actually correct
and does not need to be changed.

I actually have a newer version of my patch (see below) that uses
the cc-disable-warning macro in order to avoid some of the
side-effects of setting an unknown option on older gcc versions.

> Furthermore, "-Wno-maybe-uninitialized" gcc-option is available
> gcc-4-7+, so your patch is incomplete.

O don't understand. The patch avoids the warnings when building
with gcc-4.7 or higher with -Os.

Arnd