Skip to content

Commit

Permalink
monitor: avoid declaring unused variables
Browse files Browse the repository at this point in the history
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 <blauwirbel@gmail.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  • Loading branch information
blueswirl authored and Luiz Capitulino committed Aug 20, 2012
1 parent e36c876 commit b2dc64c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion monitor.c
Expand Up @@ -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;
Expand Down

0 comments on commit b2dc64c

Please sign in to comment.