All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Cc: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: -Werror and --disable-werror
Date: Sat, 19 Sep 2009 22:38:49 +0200	[thread overview]
Message-ID: <20090919203849.GD15672@thorin> (raw)
In-Reply-To: <4AB4E6EB.4010307@gmail.com>

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	other threads:[~2009-09-19 20:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 19:42 -Werror and --disable-werror Robert Millan
2009-09-16 19:48 ` Robert Millan
2009-09-19 14:12 ` Vladimir 'phcoder' Serbinenko
2009-09-19 20:38   ` Robert Millan [this message]
2009-09-20  6:46   ` richardvoigt
2009-09-20  8:28     ` Vladimir 'phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090919203849.GD15672@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.