Skip to content
Snippets Groups Projects
Commit 4904ca6a authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Paolo Bonzini
Browse files

monitor/hmp: Explicit we ignore a QEMUChrEvent in IOEventHandler


The Chardev events are listed in the QEMUChrEvent enum. To be
able to use this enum in the IOEventHandler typedef, we need to
explicit an event ignored by this frontend, to silent the
following GCC warning:

    CC      monitor/hmp.o
  monitor/hmp.c: In function ‘monitor_event’:
  monitor/hmp.c:1330:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch]
   1330 |     switch (event) {
        |     ^~~~~~
  cc1: all warnings being treated as errors

Acked-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191218172009.8868-13-philmd@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ed7c5bb7
No related branches found
No related tags found
No related merge requests found
......@@ -1371,6 +1371,10 @@ static void monitor_event(void *opaque, int event)
mon_refcount--;
monitor_fdsets_cleanup();
break;
case CHR_EVENT_BREAK:
/* Ignored */
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment