mirror of
https://github.com/neovim/neovim.git
synced 2026-05-27 07:18:36 +00:00
fix(style): some clang-tidy 22 fixes
CI currently uses clang-tidy 20, but this affects local builds and CI is going to be upgraded sooner or later. Some remaining systematic issues: - clang-tidy warns agains any atoi() or atol() usage (because of no error handling) - functions which takes (char *fmt, char *only_string_arg) and expect fmt to contain exactly one "%s" usage. - error: initializing non-local variable with non-const expression depending on uninitialized non-local variable (cppcoreguidelines-interfaces-global-init) This is a much worse problem in C++ (hence C++ core guidelines) where initialization is intermingled with arbitrary code execution. I "think" in plain C, the linker will either resolve all these deterministically or barf an error. But with some restructuring we could make all static initialization actually static..
This commit is contained in:
@@ -731,7 +731,7 @@ void nlua_push_Array(lua_State *lstate, const Array array, int flags)
|
||||
void nlua_push_handle(lua_State *lstate, const handle_T item, int flags)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
lua_pushnumber(lstate, (lua_Number)(item));
|
||||
lua_pushnumber(lstate, (lua_Number)item);
|
||||
}
|
||||
|
||||
/// Convert given Object to Lua value
|
||||
|
||||
Reference in New Issue
Block a user