From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2pY8-0003eE-66 for qemu-devel@nongnu.org; Sat, 18 Aug 2012 16:23:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2pY7-0001CA-A3 for qemu-devel@nongnu.org; Sat, 18 Aug 2012 16:23:12 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:51687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2pY7-0001Bx-3R for qemu-devel@nongnu.org; Sat, 18 Aug 2012 16:23:11 -0400 Message-ID: <502FF9AC.4040909@weilnetz.de> Date: Sat, 18 Aug 2012 22:23:08 +0200 From: Stefan Weil MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: avoid declaring unused variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster Am 18.08.2012 22:14, schrieb Blue Swirl: > Some variables are only used on !win32, declare > them only when used. > > This avoids a warning in mingw32 build: > CC i386-softmmu/monitor.o > /src/qemu/monitor.c: In function 'monitor_fdset_get_fd': > /src/qemu/monitor.c:2575: warning: unused variable 'mon_fd_flags' > /src/qemu/monitor.c:2574: warning: unused variable 'mon_fdset_fd' > /src/qemu/monitor.c:2573: warning: unused variable 'mon_fdset' > > Signed-off-by: Blue Swirl > --- > monitor.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/monitor.c b/monitor.c > index ce42466..480f583 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -2570,11 +2570,11 @@ FdsetInfoList *qmp_query_fdsets(Error **errp) > > int monitor_fdset_get_fd(int64_t fdset_id, int flags) > { > +#ifndef _WIN32 > MonFdset *mon_fdset; > MonFdsetFd *mon_fdset_fd; > int mon_fd_flags; > > -#ifndef _WIN32 > QLIST_FOREACH(mon_fdset, &mon_fdsets, next) { > if (mon_fdset->id != fdset_id) { > continue; Reviewed-by: Stefan Weil