This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 14/28] add gdb_assert_not_reached
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 19 Apr 2013 08:36:09 -0600
- Subject: [PATCH 14/28] add gdb_assert_not_reached
- References: <87ehe638ww dot fsf at fleche dot redhat dot com>
This patch adds a gdb_assert_not_reached to a switch in
make_fielditem. This avoids a checker complaint.
* python/py-type.c (make_fielditem): Add gdb_assert_not_reached
as 'default' in the switch.
---
gdb/python/py-type.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index b289a89..e29ae81 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -301,6 +301,8 @@ make_fielditem (struct type *type, int i, enum gdbpy_iter_kind kind)
case iter_values:
item = convert_field (type, i);
break;
+ default:
+ gdb_assert_not_reached ("invalid gdbpy_iter_kind");
}
return item;
--
1.8.1.4