qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] PATCH: uint32_t for pointer arithmetic?
@ 2004-09-18 10:31 Pavel Janík
  2004-09-18 11:10 ` malc
  0 siblings, 1 reply; 7+ messages in thread
From: Pavel Janík @ 2004-09-18 10:31 UTC (permalink / raw)
  To: qemu-devel

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) {

-- 
Pavel Janík

...... is one of the good guys, even though his user interface could stand
improvement.
                  -- Larry McVoy in linux-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-18 22:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-18 10:31 [Qemu-devel] PATCH: uint32_t for pointer arithmetic? Pavel Janík
2004-09-18 11:10 ` malc
2004-09-18 14:25   ` Pavel Janík
2004-09-18 15:09     ` malc
2004-09-18 18:03       ` Sylvain Petreolle
2004-09-18 21:37         ` Pavel Janík
2004-09-18 22:01           ` malc

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).