From: Ian Jackson Date: Wed, 17 Sep 2008 11:02:13 +0000 (+0100) Subject: few compile time warnings removed X-Git-Tag: t.master-before-merge~84^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2fb70d0653af74318cfc20afa2aa323b15f9d532;p=qemu-xen-4.3-testing.git few compile time warnings removed Few small changes to remove some compile time warnings: - we are not initializing the qemu_alarm_timer pointer in init_timer_alarm, so I am adding a NULL initialization; - in the headers include code, we are doing something like: /* BSD stuff */ /* linux stuff */ /* sun stuff */ that works most of the times but it fails when you try to compile qemu on mini-os, that is posix but it doesn't define either __sun__ or __linux__, so I am changing it to: /* BSD stuff */ /* linux stuff */ /* sun stuff */ Signed-off-by: Stefano Stabellini --- diff --git a/vl.c b/vl.c index 0fb9c176d..86dbf8341 100644 --- a/vl.c +++ b/vl.c @@ -67,7 +67,7 @@ #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) #include #else -#ifndef __sun__ +#ifdef __linux__ #include #include #include @@ -81,7 +81,8 @@ #include #include -#else +#endif +#ifdef __sun__ #include #include #include @@ -1537,7 +1538,7 @@ static void win32_rearm_timer(struct qemu_alarm_timer *t) static void init_timer_alarm(void) { - struct qemu_alarm_timer *t; + struct qemu_alarm_timer *t = NULL; int i, err = -1; for (i = 0; alarm_timers[i].name; i++) {