qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] exec.c:283: warning: cast from pointer to integer of different size
Date: Mon, 23 Jun 2008 08:39:14 +0200	[thread overview]
Message-ID: <761ea48b0806222339o32cb67e7w3e539c76c6879413@mail.gmail.com> (raw)
In-Reply-To: <485F4295.3050805@web.de>

On Mon, Jun 23, 2008 at 8:28 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> Hi Paul,
>
> trying to get rid of some of the various compiler warnings, specifically
> on 64-bit hosts, I came across this:
>
>> #if defined(CONFIG_USER_ONLY)
>>         unsigned long addr;
>>         size_t len = sizeof(PageDesc) * L2_SIZE;
>>         /* Don't use qemu_malloc because it may recurse.  */
>>         p = mmap(0, len, PROT_READ | PROT_WRITE,
>>                  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
>>         *lp = p;
>>         addr = h2g(p);
>>         if (addr == (target_ulong)addr) {
>>             page_set_flags(addr & TARGET_PAGE_MASK,
>>                            TARGET_PAGE_ALIGN(addr + len),
>>                            PAGE_RESERVED);
>>         }
>> #else
>
> Something is fishy here. h2g already returns target_ulong (and generates
> compiler warnings at this chance), but the succeeding line seems to
> assume that addr can still be larger than that. Now I wonder what this
> code is actually supposed to do.

I already reported this two weeks ago and got no feedback.

http://lists.gnu.org/archive/html/qemu-devel/2008-06/msg00324.html


Laurent

      reply	other threads:[~2008-06-23  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-23  6:28 [Qemu-devel] exec.c:283: warning: cast from pointer to integer of different size Jan Kiszka
2008-06-23  6:39 ` Laurent Desnogues [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=761ea48b0806222339o32cb67e7w3e539c76c6879413@mail.gmail.com \
    --to=laurent.desnogues@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).