qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>, Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] More gcc -Wflags
Date: Thu, 4 Sep 2008 22:09:34 +0300	[thread overview]
Message-ID: <f43fc5580809041209x63c015e4i31713666d9cdbf36@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

These patches enable gcc warning flags -Wendif-labels, -Wshadow and
-Wpointer-arith. The other patches fix some of these warnings.

For -Wendif-labels there is nothing to fix, all code is clean. I'd
enable this flag.

Enabling -Wshadow produces a lot of useless warnings about variables
named 'index' etc, so I'm not proposing to add that. I might still fix
the warnings for local variables shadowing each other, but maybe it's
not worth the trouble and risk for new bugs.

Fixes for -Wpointer-arith are not too many, except for ARM devices.
Maybe there the use of void * arithmetics is intentional? If Paul
agrees that these should be fixed, I could make a patch that removes
these warnings too. After that, the flag could be enabled.

[-- Attachment #2: wpointer_arith.diff --]
[-- Type: plain/text, Size: 1001 bytes --]

[-- Attachment #3: fix_wpointer_arith.diff --]
[-- Type: plain/text, Size: 5025 bytes --]

[-- Attachment #4: wshadow.diff --]
[-- Type: plain/text, Size: 1017 bytes --]

[-- Attachment #5: fix_wshadow.diff --]
[-- Type: plain/text, Size: 15640 bytes --]

                 reply	other threads:[~2008-09-04 19:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=f43fc5580809041209x63c015e4i31713666d9cdbf36@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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).