This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 14/28] add gdb_assert_not_reached


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]