neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b986fd96bc8d9ef8739efd9c5c4221f04a2c3463
parent d2257402e310806617450d57b3d133108ebb20b9
Author: Justin M. Keyes <justinkz@gmail.com>
Date:   Tue, 23 Sep 2025 19:29:02 -0400

fix(lua): coverity "unreachable" warning #35874

Problem:

    CID 584865:         Control flow issues  (UNREACHABLE)
    /src/nvim/lua/executor.c: 550             in nlua_wait()
    >>>     CID 584865:         Control flow issues  (UNREACHABLE)
    >>>     This code cannot be reached: "abort();".
    550       abort();
    551     }

Solution:
The abort() was intended to encourage explicit handling of all cases, to
avoid fallthrough to a possible `return x` added at the end. However,
this is unlikely so just drop it.
Diffstat:
Msrc/nvim/lua/executor.c | 2--
1 file changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c @@ -543,8 +543,6 @@ static int nlua_wait(lua_State *lstate) lua_pushinteger(lstate, -1); return 2; } - - abort(); } static nlua_ref_state_t *nlua_new_ref_state(lua_State *lstate, bool is_thread)