[PATCH 14/28] add gdb_assert_not_reached

Tom Tromey
2013-04-19T14:36:20Z

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