From 9c74709264a831cc13e8295579f4188b3c62b3e5 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sun, 11 Sep 2011 19:27:44 -0400 Subject: [PATCH] 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. --- src/explain.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.43.2