qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix definition of NULL


From: Stefan Weil
Subject: [Qemu-devel] [PATCH] Fix definition of NULL
Date: Fri, 06 Feb 2009 22:20:54 +0100
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

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



Fix declaration of NULL.

Signed-off-by: Stefan Weil <address@hidden>

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"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]