mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
refactor: fix clang/PVS warnings (#23731)
This commit is contained in:
parent
30c02781ca
commit
677e02be4e
@ -48,7 +48,6 @@
|
||||
#include "nvim/highlight_group.h"
|
||||
#include "nvim/input.h"
|
||||
#include "nvim/keycodes.h"
|
||||
#include "nvim/lua/secure.h"
|
||||
#include "nvim/macros.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/mark.h"
|
||||
|
@ -3481,8 +3481,7 @@ void vim_deltempdir(void)
|
||||
char *vim_gettempdir(void)
|
||||
{
|
||||
static int notfound = 0;
|
||||
bool exists = false;
|
||||
if (vim_tempdir == NULL || !(exists = os_isdir(vim_tempdir))) {
|
||||
if (vim_tempdir == NULL || !os_isdir(vim_tempdir)) {
|
||||
if (vim_tempdir != NULL) {
|
||||
notfound++;
|
||||
if (notfound == 1) {
|
||||
|
@ -55,6 +55,7 @@ defsfile:write(string.format([[
|
||||
#include "nvim/help.h"
|
||||
#include "nvim/indent.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/lua/secure.h"
|
||||
#include "nvim/mapping.h"
|
||||
#include "nvim/mark.h"
|
||||
#include "nvim/match.h"
|
||||
|
@ -341,7 +341,7 @@ static int nlua_init_argv(lua_State *const L, char **argv, int argc, int lua_arg
|
||||
lua_pushstring(L, argv[lua_arg0 - 1]);
|
||||
lua_rawseti(L, -2, 0); // _G.arg[0] = "foo.lua"
|
||||
|
||||
for (; lua_arg0 >= 0 && i + lua_arg0 < argc; i++) {
|
||||
for (; i + lua_arg0 < argc; i++) {
|
||||
lua_pushstring(L, argv[i + lua_arg0]);
|
||||
lua_rawseti(L, -2, i + 1); // _G.arg[i+1] = "--foo"
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <lauxlib.h>
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
|
Loading…
Reference in New Issue
Block a user