From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kin9W-00044y-OM for qemu-devel@nongnu.org; Thu, 25 Sep 2008 05:28:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kin9V-00044e-U4 for qemu-devel@nongnu.org; Thu, 25 Sep 2008 05:28:50 -0400 Received: from [199.232.76.173] (port=55942 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kin9V-00044b-Nu for qemu-devel@nongnu.org; Thu, 25 Sep 2008 05:28:49 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:14422) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kin9W-0007kU-4f for qemu-devel@nongnu.org; Thu, 25 Sep 2008 05:28:50 -0400 Message-ID: <48DB5A51.6050800@eu.citrix.com> Date: Thu, 25 Sep 2008 10:30:57 +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 Could someone take a look at this patch, please? It should only take few minutes. 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++) { > >