From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEMdi-0008PF-Nh for qemu-devel@nongnu.org; Wed, 10 Jun 2009 08:10:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEMde-00082o-3b for qemu-devel@nongnu.org; Wed, 10 Jun 2009 08:10:46 -0400 Received: from [199.232.76.173] (port=57570 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEMdd-00082J-VN for qemu-devel@nongnu.org; Wed, 10 Jun 2009 08:10:42 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51429) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEMdd-0008Tr-IZ for qemu-devel@nongnu.org; Wed, 10 Jun 2009 08:10:41 -0400 Date: Tue, 9 Jun 2009 21:30:02 -0300 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [PATCH] Fix "defined but not used" warning Message-ID: <20090610003002.GA6060@amt.cnet> References: <20090609182457.2d7a22dc@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20090609182457.2d7a22dc@redhat.com> Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Tue, Jun 09, 2009 at 06:24:57PM -0300, Luiz Capitulino wrote: >=20 > The function qemu_calculate_timeout() is only used when CONFIG_IOTHREAD > is not defined. When CONFIG_IOTHREAD is defined, we have the following > warning: >=20 > vl.c:4389: warning: =E2=80=98qemu_calculate_timeout=E2=80=99 defined bu= t not used >=20 > This change fixes that by moving the #ifdef/#endif from main_loop() > into qemu_calculate_timeout(). This encapsulates the logic and allow > us to use qemu_calculate_timeout() when CONFIG_IOTHREAD is defined > or not (suggested by Glauber Costa). ACK