All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan McCabe <rmccabe@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC] Switch the entire project to use -Werror
Date: Thu, 30 Aug 2007 13:53:29 -0400	[thread overview]
Message-ID: <20070830175329.GA156481@redhat.com> (raw)
In-Reply-To: <20070830173846.GW17551@redhat.com>

On Thu, Aug 30, 2007 at 01:38:46PM -0400, Lon Hohberger wrote:
> I agree.  Clean code is a good thing.
> 
> However, others may / may not want to comment.

GCC can still be really stupid and issue warnings about code that's
perfectly fine, for example:

[rmccabe at sublimit ~]$ cat test.c
int main(void) {
    int x, y = 1;
    if (y || x)
        x = 1;
    return 0;
}

[rmccabe at sublimit ~]$ gcc -O2 -Wall -Werror test.c -o test
cc1: warnings being treated as errors
test.c: In function ?main?:
test.c:3: warning: ?x? is used uninitialized in this function

Ryan



  reply	other threads:[~2007-08-30 17:53 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 [this message]
2007-08-30 17:59     ` Fabio M. Di Nitto
     [not found]       ` <20070830180912.GB156481@redhat.com>
2007-08-30 18:12         ` Fabio M. Di Nitto
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=20070830175329.GA156481@redhat.com \
    --to=rmccabe@redhat.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.