qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix definition of NULL
@ 2009-02-06 21:20 Stefan Weil
  2009-02-06 23:25 ` M. Warner Losh
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2009-02-06 21:20 UTC (permalink / raw)
  To: QEMU Developers

[-- 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"

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

end of thread, other threads:[~2009-02-06 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06 21:20 [Qemu-devel] [PATCH] Fix definition of NULL Stefan Weil
2009-02-06 23:25 ` M. Warner Losh

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