From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kfc6a-0000Gp-DI for qemu-devel@nongnu.org; Tue, 16 Sep 2008 11:04:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kfc6Z-0000GV-FS for qemu-devel@nongnu.org; Tue, 16 Sep 2008 11:04:39 -0400 Received: from [199.232.76.173] (port=53396 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kfc6Z-0000GS-C2 for qemu-devel@nongnu.org; Tue, 16 Sep 2008 11:04:39 -0400 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:8706 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kfc6Y-0002qg-PZ for qemu-devel@nongnu.org; Tue, 16 Sep 2008 11:04:39 -0400 Message-ID: <48CFCB81.40708@eu.citrix.com> Date: Tue, 16 Sep 2008 16:06:41 +0100 From: Stefano Stabellini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] few compile time warnings removed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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: #ifdef /* BSD stuff */ #else #ifndef __sun__ /* linux stuff */ #else /* sun stuff */ #endif #endif 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: #ifdef /* BSD stuff */ #else #ifdef __linux__ /* linux stuff */ #endif #ifdef __sun__ /* sun stuff */ #endif #endif Signed-off-by: Stefano Stabellini diff --git a/vl.c b/vl.c index 0d96401..69aee16 100644 --- a/vl.c +++ b/vl.c @@ -70,7 +70,7 @@ #elif defined (__GLIBC__) && defined (__FreeBSD_kernel__) #include #else -#ifndef __sun__ +#ifdef __linux__ #include #include #include @@ -84,7 +84,8 @@ #include #include -#else +#endif +#ifdef __sun__ #include #include #include @@ -1676,7 +1677,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++) {