mirror of
https://github.com/neovim/neovim.git
synced 2026-04-01 05:12:02 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user