qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] monitor: avoid declaring unused variables


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] monitor: avoid declaring unused variables
Date: Sat, 18 Aug 2012 22:23:08 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

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 <address@hidden>
---
  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 <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]