[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -Werror and --disable-werror
From: |
Vladimir 'phcoder' Serbinenko |
Subject: |
Re: -Werror and --disable-werror |
Date: |
Sat, 19 Sep 2009 16:12:59 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090701) |
Robert Millan wrote:
> Hi,
>
> -Werror is not in effect. This will help ensuring that all new code is
> checked to be warning-free before commit (incidentally, I found a newly
> introduced bug thanks to this just minutes before enabling it).
>
>
If you mean this change:
+ /* Any value different than `p.offset' will satisfy the check during
+ first loop. */
+ lastaddr = !p.offset;
+
Then there was no bug here.
if (labeln && lastaddr == p.offset)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected");
labeln++;
if ((labeln & (labeln - 1)) == 0)
lastaddr = p.offset;
labeln is 0 during first loop run and then lastaddr is set. I explicitly
omitted initing variables to have smaller loop detector
> Since -Werror may be a problem in some situations, I've added a
> --disable-werror switch, which does the obvious thing.
>
>