From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Fix definition of NULL
Date: Fri, 06 Feb 2009 22:20:54 +0100 [thread overview]
Message-ID: <498CA9B6.5080302@mail.berlios.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
Hello,
the definition of NULL in dyngen-exec.h is correct for C++
but wrong for C. It results in a compiler warning.
My patch fixes it. Because Qemu does not support C++,
I just used the C definition and did not try to support
C++, too.
Regards
Stefan Weil
[-- Attachment #2: null.patch --]
[-- Type: text/x-diff, Size: 496 bytes --]
Fix declaration of NULL.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Index: trunk/dyngen-exec.h
===================================================================
--- trunk.orig/dyngen-exec.h 2009-02-06 22:15:33.000000000 +0100
+++ trunk/dyngen-exec.h 2009-02-06 22:16:03.000000000 +0100
@@ -91,7 +91,7 @@
extern int fputs(const char *, FILE *);
extern int printf(const char *, ...);
#undef NULL
-#define NULL 0
+#define NULL ((void *)0)
#if defined(__i386__)
#define AREG0 "ebp"
next reply other threads:[~2009-02-06 21:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 21:20 Stefan Weil [this message]
2009-02-06 23:25 ` [Qemu-devel] [PATCH] Fix definition of NULL M. Warner Losh
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=498CA9B6.5080302@mail.berlios.de \
--to=weil@mail.berlios.de \
--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 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).