From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAfXf-0003to-EN for qemu-devel@nongnu.org; Mon, 23 Jun 2008 02:28:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAfXc-0003s6-Uu for qemu-devel@nongnu.org; Mon, 23 Jun 2008 02:28:42 -0400 Received: from [199.232.76.173] (port=47482 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAfXc-0003ry-Qc for qemu-devel@nongnu.org; Mon, 23 Jun 2008 02:28:40 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:48215) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KAfXc-0004M7-IG for qemu-devel@nongnu.org; Mon, 23 Jun 2008 02:28:40 -0400 Message-ID: <485F4295.3050805@web.de> Date: Mon, 23 Jun 2008 08:28:37 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigECEDAD4CEB947D861BFC0A6D" Sender: jan.kiszka@web.de Subject: [Qemu-devel] exec.c:283: warning: cast from pointer to integer of different size Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigECEDAD4CEB947D861BFC0A6D Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 =3D sizeof(PageDesc) * L2_SIZE; > /* Don't use qemu_malloc because it may recurse. */ > p =3D mmap(0, len, PROT_READ | PROT_WRITE, > MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); > *lp =3D p; > addr =3D h2g(p); > if (addr =3D=3D (target_ulong)addr) { > page_set_flags(addr & TARGET_PAGE_MASK, > TARGET_PAGE_ALIGN(addr + len), > PAGE_RESERVED);=20 > } > #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. Jan --------------enigECEDAD4CEB947D861BFC0A6D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIX0KVniDOoMHTA+kRArZIAJ9FS9rwaQNfwhBB3xtMfEFditoNiwCeOh9z ZWJrDNfN3KHgzI39O7psYnY= =0iwc -----END PGP SIGNATURE----- --------------enigECEDAD4CEB947D861BFC0A6D--