qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH][RFC] Fix gcc 4.x warnings (-Wpointer-sign)
Date: Sat, 13 Sep 2008 20:02:52 +0300	[thread overview]
Message-ID: <f43fc5580809131002s362391e9o93849686130c809a@mail.gmail.com> (raw)
In-Reply-To: <f43fc5580809122338u2be3deecic94ac08768c4b01f@mail.gmail.com>

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

On 9/13/08, Blue Swirl <blauwirbel@gmail.com> wrote:
> On 9/12/08, M. Warner Losh <imp@bsdimp.com> wrote:
>  > In message: <f43fc5580809121256i1d15c407vbebbfc8cd081cb43@mail.gmail.com>
>  >             "Blue Swirl" <blauwirbel@gmail.com> writes:
>  >  : GCC 4 enables -Wpointer-sign if -Wall is enabled. This trivial patch
>  >
>  > : suppresses the warnings. Comments? Objections?
>  >
>  >
>  > Don't you mean 'fix' the warnings, since this patch looks like it
>  >  tries to cast things to be correct...
>
>
> Well, some parts of the patch actually fix the types so that they are
>  more consistent, the casts just silence the warnings. A real fix would
>  be to change the types but then it would be incorrect to change the
>  signed types just to match the unsigned loadvm/savevm API.
>
>  Now that I think of it, the API could be extended with signed
>  versions. That would be best in terms of type safety. Maybe I'll try
>  that approach instead.

The first patch adds signed versions. This cleans up some parts
because casts are no longer needed.

The second patch fixes other warnings by making the types more
consistent, like before.

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

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

      reply	other threads:[~2008-09-13 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 19:56 [Qemu-devel] [PATCH][RFC] Fix gcc 4.x warnings (-Wpointer-sign) Blue Swirl
2008-09-12 20:59 ` M. Warner Losh
2008-09-13  6:38   ` Blue Swirl
2008-09-13 17:02     ` Blue Swirl [this message]

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=f43fc5580809131002s362391e9o93849686130c809a@mail.gmail.com \
    --to=blauwirbel@gmail.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).