grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -Werror and --disable-werror


From: Robert Millan
Subject: Re: -Werror and --disable-werror
Date: Sat, 19 Sep 2009 22:38:49 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Sep 19, 2009 at 04:12:59PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> 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

Oh, I see.  Well, since in this case there's no bug, as long as the warning
is gone it should be ok.  Any other idea on how to archieve that?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]