From: Pavel@Janik.cz (Pavel Janík)
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] PATCH: uint32_t for pointer arithmetic?
Date: Sat, 18 Sep 2004 12:31:18 +0200 [thread overview]
Message-ID: <87d60jhnrd.fsf@Janik.cz> (raw)
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
next reply other threads:[~2004-09-18 10:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-18 10:31 Pavel Janík [this message]
2004-09-18 11:10 ` [Qemu-devel] PATCH: uint32_t for pointer arithmetic? 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
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=87d60jhnrd.fsf@Janik.cz \
--to=pavel@janik.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.