From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ME9Fr-0002Ng-Fx for qemu-devel@nongnu.org; Tue, 09 Jun 2009 17:53:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ME9Fm-0002He-Nj for qemu-devel@nongnu.org; Tue, 09 Jun 2009 17:53:14 -0400 Received: from [199.232.76.173] (port=54422 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ME9Fm-0002HI-GE for qemu-devel@nongnu.org; Tue, 09 Jun 2009 17:53:10 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59461) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ME9Fl-0007By-SG for qemu-devel@nongnu.org; Tue, 09 Jun 2009 17:53:10 -0400 Subject: Re: [Qemu-devel] [PATCH] Fix "defined but not used" warning From: Mark McLoughlin In-Reply-To: <20090609182457.2d7a22dc@redhat.com> References: <20090609182457.2d7a22dc@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 09 Jun 2009 22:53:05 +0100 Message-Id: <1244584385.7164.22.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: Mark McLoughlin 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, 2009-06-09 at 18:24 -0300, Luiz Capitulino wrote: > 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). >=20 > Signed-off-by: Luiz Capitulino Looks correct and is a good cleanup too. Moves us closer to being able to build with --enable-werror always :-) Reviewed-by: Mark McLoughlin Cheers, Mark.