qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 1/2] qapi: Do not generate default switch case in gen_visit_objec


From: Philippe Mathieu-Daudé
Subject: [PATCH 1/2] qapi: Do not generate default switch case in gen_visit_object_members()
Date: Fri, 24 Feb 2023 16:54:50 +0100

When iterating over a QAPISchemaEnumType, all possible
values are covered. The 'default' switch case is unreachable,
remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 scripts/qapi/visit.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/scripts/qapi/visit.py b/scripts/qapi/visit.py
index 26a584ee4c..f66a31a963 100644
--- a/scripts/qapi/visit.py
+++ b/scripts/qapi/visit.py
@@ -159,8 +159,6 @@ def gen_visit_object_members(name: str,
 
             ret += var.ifcond.gen_endif()
         ret += mcgen('''
-    default:
-        abort();
     }
 ''')
 
-- 
2.38.1




reply via email to

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