cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Fabio M. Di Nitto <fabbione@ubuntu.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC] Switch the entire project to use -Werror
Date: Thu, 30 Aug 2007 19:12:41 +0100	[thread overview]
Message-ID: <46D70899.90902@ubuntu.com> (raw)
In-Reply-To: <20070830180912.GB156481@redhat.com>

Ryan McCabe wrote:
> On Thu, Aug 30, 2007 at 06:59:22PM +0100, Fabio M. Di Nitto wrote:
>> int x, y=1; <- doesn?t init x to 1. Only y.
>>
>> and you are getting a warning on if(y || x). at this point only y is
>> initialized. So for what I can see it is valid.
>>
>> and please flame hard if i am missing the point... i just come out of an
>> 11 hours meeting ;)
> 
> x is never evaluated because the || short-circuits once y evaluates to
> true, so x is never read before being initialized. This is kind of a
> contrived example, but I've seen GCC report these same kinds of bogus
> errors in code that isn't contrived.
> 
> Ryan

Oh ok.. of course you are right and I see the point.

Thanks
Fabio

-- 
I'm going to make him an offer he can't refuse.



  parent reply	other threads:[~2007-08-30 18:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26  5:56 [Cluster-devel] [RFC] Switch the entire project to use -Werror Fabio Massimo Di Nitto
2007-08-29  3:13 ` Fabio Massimo Di Nitto
2007-08-30 17:38 ` Lon Hohberger
2007-08-30 17:53   ` Ryan McCabe
2007-08-30 17:59     ` Fabio M. Di Nitto
     [not found]       ` <20070830180912.GB156481@redhat.com>
2007-08-30 18:12         ` Fabio M. Di Nitto [this message]
2007-08-30 17:54   ` Fabio M. Di Nitto
2007-08-31 12:02   ` Patrick Caulfield
2007-08-31 12:19     ` Fabio M. Di Nitto
2007-09-07 18:28       ` Lon Hohberger
2007-09-07 18:26     ` Lon Hohberger

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=46D70899.90902@ubuntu.com \
    --to=fabbione@ubuntu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).