[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] PATCH: uint32_t for pointer arithmetic?
From: |
Pavel Janík |
Subject: |
[Qemu-devel] PATCH: uint32_t for pointer arithmetic? |
Date: |
Sat, 18 Sep 2004 12:31:18 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
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
- [Qemu-devel] PATCH: uint32_t for pointer arithmetic?,
Pavel Janík <=