From 4641ef43544dd6431d9f1f5e640d13eb7e92952d Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 20 Jun 2021 14:16:24 -0700 Subject: [PATCH] swap assertion in agdelrec for a call to UNREACHABLE This removes some -Wstring-conversion warnings when building with Clang, due to the expression `!"unreachable"`. It also teaches the compiler it can more aggressively optimize this switch. --- lib/cgraph/rec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cgraph/rec.c b/lib/cgraph/rec.c index 27b6a5ba1..0b3e2b727 100644 --- a/lib/cgraph/rec.c +++ b/lib/cgraph/rec.c @@ -9,6 +9,7 @@ *************************************************************************/ #include +#include #include #include @@ -153,8 +154,7 @@ int agdelrec(void *arg_obj, char *name) agapply(agroot(g), obj, objdelrec, rec, FALSE); break; default: - assert(!"unreachable"); - break; + UNREACHABLE(); } agstrfree(g, rec->name); agfree(g, rec); -- 2.40.0