qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] qapi: Simplify enum generation
@ 2023-02-24 15:54 Philippe Mathieu-Daudé
  2023-02-24 15:54 ` [PATCH 1/2] qapi: Do not generate default switch case in gen_visit_object_members() Philippe Mathieu-Daudé
  2023-02-24 15:54 ` [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup() Philippe Mathieu-Daudé
  0 siblings, 2 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-24 15:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Pavel Dovgalyuk, Paolo Bonzini, Michael Roth,
	Dr. David Alan Gilbert, Stefan Berger, Gerd Hoffmann,
	Markus Armbruster, Juan Quintela, Philippe Mathieu-Daudé

QAPI generating enum count as part of the enum forces handling
impossible switch cases. Modify qapi/types.py to generate the
enum count as a definition.
Do not try to cover the unreachable 'default' case.
Clean files covering unreachable foo__MAX case.

Philippe Mathieu-Daudé (2):
  qapi: Do not generate default switch case in
    gen_visit_object_members()
  qapi: Generate enum count as definition in gen_enum_lookup()

 audio/audio.c          |  6 ------
 audio/audio_template.h |  3 ---
 migration/migration.c  |  2 --
 replay/replay-input.c  | 12 ------------
 scripts/qapi/types.py  | 11 +++++++----
 scripts/qapi/visit.py  |  2 --
 softmmu/tpm-hmp-cmds.c |  2 --
 ui/input-linux.c       |  4 ----
 ui/input.c             |  6 ------
 9 files changed, 7 insertions(+), 41 deletions(-)

-- 
2.38.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-15 10:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24 15:54 [PATCH 0/2] qapi: Simplify enum generation Philippe Mathieu-Daudé
2023-02-24 15:54 ` [PATCH 1/2] qapi: Do not generate default switch case in gen_visit_object_members() Philippe Mathieu-Daudé
2023-02-27 12:40   ` Juan Quintela
2023-02-27 13:14   ` Markus Armbruster
2023-02-24 15:54 ` [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup() Philippe Mathieu-Daudé
2023-02-24 21:16   ` Richard Henderson
2023-02-27 12:41   ` Juan Quintela
2023-02-27 13:10   ` Markus Armbruster
2023-03-15 10:32     ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).