From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C8dDD-0006SN-7G for qemu-devel@nongnu.org; Sat, 18 Sep 2004 07:17:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C8dDB-0006S2-Hv for qemu-devel@nongnu.org; Sat, 18 Sep 2004 07:17:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8dDB-0006Rs-Eo for qemu-devel@nongnu.org; Sat, 18 Sep 2004 07:17:01 -0400 Received: from [217.10.32.17] (helo=comtv.ru) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C8d7I-0005qK-Pb for qemu-devel@nongnu.org; Sat, 18 Sep 2004 07:10:59 -0400 Received: from av1474.oops ([10.0.66.9] verified) by comtv.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP id 38902696 for qemu-devel@nongnu.org; Sat, 18 Sep 2004 15:10:49 +0400 Date: Sat, 18 Sep 2004 15:10:27 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] PATCH: uint32_t for pointer arithmetic? In-Reply-To: <87d60jhnrd.fsf@Janik.cz> Message-ID: References: <87d60jhnrd.fsf@Janik.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sat, 18 Sep 2004, [iso-8859-2] Pavel Jan?k wrote: > Hi, > > oss.c is IMHO unnecessary retyping pointers to uint32_t and only after that > to void *. This means that this will issue two warnings on 64bit platforms: > > /home/pavel/QEMU/qemu-cvs/oss.c: In function `AUD_run': > /home/pavel/QEMU/qemu-cvs/oss.c:406: warning: cast from pointer to integer of different size > /home/pavel/QEMU/qemu-cvs/oss.c:406: warning: cast to pointer from integer of different size > > --- oss.c.~1.5.~ 2004-07-08 21:13:39.000000000 +0200 > +++ oss.c 2004-09-18 12:23:57.017793080 +0200 > @@ -403,7 +403,7 @@ > > left = oss.bufsize - oss.rpos; > play = MIN (left, bytes); > - written = write (oss.fd, (void *) ((uint32_t) oss.buf + oss.rpos), play); > + written = write (oss.fd, (void *) (oss.buf + oss.rpos), play); > > if (-1 == written) { > if (EAGAIN == errno || EINTR == errno) { oss.c in CVS, is obsolete(from my point of view anyhow), i would apreciate if you check following though. http://www.boblycat.org/~malc/code/patches/qemu/7b_aqemu.patch.gz -- mailto:malc@pulsesoft.com