diff options
author | James McCoy <jamessan@jamessan.com> | 2021-01-31 10:43:03 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2021-01-31 11:28:52 -0500 |
commit | 27a7a4d38405a30611339fc663e426904bda1099 (patch) | |
tree | 23935162b10ba9fa607df9a35ea3b3da7ea9349e /src/nvim/buffer.c | |
parent | 035ee868ae2d9cbbf2a290ca3412946fade20833 (diff) | |
download | rneovim-27a7a4d38405a30611339fc663e426904bda1099.tar.gz rneovim-27a7a4d38405a30611339fc663e426904bda1099.tar.bz2 rneovim-27a7a4d38405a30611339fc663e426904bda1099.zip |
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.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 0134ee838d..ec39de14f5 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3270,7 +3270,7 @@ void maketitle(void) case 6: buf_p = strappend(buf_p, " -"); break; case 5: case 7: buf_p = strappend(buf_p, " -+"); break; - default: assert(false); + default: abort(); } if (curbuf->b_fname != NULL) { |