From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Khhwr-0008SM-SI for qemu-devel@nongnu.org; Mon, 22 Sep 2008 05:43:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Khhwq-0008Rt-MG for qemu-devel@nongnu.org; Mon, 22 Sep 2008 05:43:17 -0400 Received: from [199.232.76.173] (port=40033 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khhwq-0008Rk-E4 for qemu-devel@nongnu.org; Mon, 22 Sep 2008 05:43:16 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:54034) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Khhwp-00069y-Te for qemu-devel@nongnu.org; Mon, 22 Sep 2008 05:43:16 -0400 Message-ID: <48D76931.3000801@eu.citrix.com> Date: Mon, 22 Sep 2008 10:45:21 +0100 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] few compile time warnings removed References: <48CFCB81.40708@eu.citrix.com> In-Reply-To: <48CFCB81.40708@eu.citrix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Any news on this? Stefano Stabellini wrote: > 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++) { > >