From 7a68aade04d8cac3d294dd8c4448e7b71f53b9b3 Mon Sep 17 00:00:00 2001 From: Till Riedel Date: Tue, 24 Jun 2003 00:03:48 +0000 Subject: [PATCH] returns after assert(0) inserted [r1390] --- ir/ana/cgana.c | 1 + ir/debug/dbginfo.h | 1 + ir/ir/irnode.c | 1 + ir/tr/entity.c | 4 +++- ir/tr/type.c | 3 +++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ir/ana/cgana.c b/ir/ana/cgana.c index 0f6528ce5..239e8313b 100644 --- a/ir/ana/cgana.c +++ b/ir/ana/cgana.c @@ -57,6 +57,7 @@ static entity * get_implementation(type * class, entity * method) { } } assert(0 && "implemenation not found"); + return NULL; } /* Returns the entity that contains the implementation of the inherited diff --git a/ir/debug/dbginfo.h b/ir/debug/dbginfo.h index 34445cc59..9ff67dd9d 100644 --- a/ir/debug/dbginfo.h +++ b/ir/debug/dbginfo.h @@ -137,6 +137,7 @@ INLINE static const char* dbg_action_2_str(dbg_action a) { return "string conversion not implemented"; else assert(0); + return NULL; } } diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 671170402..c3d95dc22 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -2116,6 +2116,7 @@ get_irn_irg(ir_node *node) { return node->attr.end.irg; } else { assert(0 && "no irg attr"); + return NULL; } } diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 37fb64b4d..8bc79552d 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -413,7 +413,9 @@ ir_node *copy_const_value(ir_node *n) { case iro_Add: nn = new_Add(copy_const_value(get_Add_left(n)), copy_const_value(get_Add_right(n)), m); break; default: - assert(0 && "opdope invalid or not implemented"); break; + assert(0 && "opdope invalid or not implemented"); + nn=NULL; + break; } return nn; } diff --git a/ir/tr/type.c b/ir/tr/type.c index a6f906ec7..f30e236c3 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -1346,7 +1346,10 @@ entity *get_compound_member(type *tp, int pos) else if (is_union_type(tp)) res = get_union_member(tp, pos); else + { assert(0 && "need struct, union or class to get a member"); + res=NULL; + } return res; } -- 2.20.1