From 27a7a4d38405a30611339fc663e426904bda1099 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 31 Jan 2021 10:43:03 -0500 Subject: Use abort() instead of assert(false) for things that should never happen assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases. --- src/nvim/eval/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval/executor.c') diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c index da05ecda43..bbba9d12f2 100644 --- a/src/nvim/eval/executor.c +++ b/src/nvim/eval/executor.c @@ -118,7 +118,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, return OK; } case VAR_UNKNOWN: { - assert(false); + abort(); } } } -- cgit