From: Nick Bowler Date: Sun, 11 Sep 2011 23:27:44 +0000 (-0400) Subject: Abort on "impossible" condition. X-Git-Tag: v1~124 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/9c74709264a831cc13e8295579f4188b3c62b3e5 Abort on "impossible" condition. A corrupt or otherwise invalid cdecl structure could make the explain_prologue function fail to return a value. Add an assertion to catch that. --- diff --git a/src/explain.c b/src/explain.c index 41d4f7b..d50e45e 100644 --- a/src/explain.c +++ b/src/explain.c @@ -48,6 +48,8 @@ explain_prologue(char *buf, size_t n, struct cdecl_declarator *d, bool top) d = d->child; } + + assert(0); } static size_t