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/ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/ops.c') diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 052b07ed44..87d092281a 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2623,7 +2623,7 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append) } // NOTREACHED case kMTUnknown: - assert(false); + abort(); } } @@ -6092,7 +6092,7 @@ static void set_clipboard(int name, yankreg_T *reg) break; } case kMTUnknown: { - assert(false); + abort(); } } -- cgit