From ff792542642cf1aee8da6069f45a7322af7c8a74 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 6 Oct 2024 19:46:16 -0600 Subject: s/assert(false)/__builtin_unreachable()/ --- lib9p/map.h | 2 +- libcr/coroutine.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib9p/map.h b/lib9p/map.h index dcb6ecd..a13edb5 100644 --- a/lib9p/map.h +++ b/lib9p/map.h @@ -84,7 +84,7 @@ static VAL_T *MAP_METHOD(NAME,store)(struct NAME *m, KEY_T k, VAL_T v) { m->items[i].val = v; return &(m->items[i].val); } - assert(false); + __builtin_unreachable(); } /** diff --git a/libcr/coroutine.c b/libcr/coroutine.c index 176590a..1891b61 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -464,7 +464,7 @@ cid_t coroutine_add_with_stack_size(size_t stack_size, cr_fn_t fn, void *args) { debugf("...stack_base=%p\n", stack_base); /* run until cr_begin() */ cr_plat_call_with_stack(stack_base, fn, args); - assert(false); /* should cr_begin() instead of returning */ + __builtin_unreachable(); /* should cr_begin() instead of returning */ } assert_cid_state(child, state == CR_RUNNABLE); if (parent) -- cgit v1.2.3-2-g168b