mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
refactor: fix clang and PVS warnings (#19569)
The last commit didn't actually disable V1028 because of a typo. Fix the typo so it is actually disabled.
This commit is contained in:
@@ -380,7 +380,7 @@ run_analysis() {(
|
|||||||
--sourcetree-root . || true
|
--sourcetree-root . || true
|
||||||
|
|
||||||
rm -rf PVS-studio.{xml,err,tsk,html.d}
|
rm -rf PVS-studio.{xml,err,tsk,html.d}
|
||||||
local plog_args="PVS-studio.log --srcRoot . --excludedCodes V002,V011,V1024,V1042,V1051,V1074"
|
local plog_args="PVS-studio.log --srcRoot . --excludedCodes V002,V011,V1028,V1042,V1051,V1074"
|
||||||
plog-converter $plog_args --renderTypes xml --output PVS-studio.xml
|
plog-converter $plog_args --renderTypes xml --output PVS-studio.xml
|
||||||
plog-converter $plog_args --renderTypes errorfile --output PVS-studio.err
|
plog-converter $plog_args --renderTypes errorfile --output PVS-studio.err
|
||||||
plog-converter $plog_args --renderTypes tasklist --output PVS-studio.tsk
|
plog-converter $plog_args --renderTypes tasklist --output PVS-studio.tsk
|
||||||
|
@@ -412,7 +412,6 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!argc_valid) {
|
if (!argc_valid) {
|
||||||
argc = 0; // Ensure that args array isn't erroneously freed at the end.
|
|
||||||
VALIDATION_ERROR("Incorrect number of arguments supplied");
|
VALIDATION_ERROR("Incorrect number of arguments supplied");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1268,7 +1268,7 @@ void free_all_functions(void)
|
|||||||
// Clean up the current_funccal chain and the funccal stack.
|
// Clean up the current_funccal chain and the funccal stack.
|
||||||
while (current_funccal != NULL) {
|
while (current_funccal != NULL) {
|
||||||
tv_clear(current_funccal->rettv);
|
tv_clear(current_funccal->rettv);
|
||||||
cleanup_function_call(current_funccal);
|
cleanup_function_call(current_funccal); // -V595
|
||||||
if (current_funccal == NULL && funccal_stack != NULL) {
|
if (current_funccal == NULL && funccal_stack != NULL) {
|
||||||
restore_funccal();
|
restore_funccal();
|
||||||
}
|
}
|
||||||
|
@@ -2481,7 +2481,7 @@ size_t find_ident_at_pos(win_T *wp, linenr_T lnum, colnr_T startcol, char_u **te
|
|||||||
col = 0;
|
col = 0;
|
||||||
// Search for point of changing multibyte character class.
|
// Search for point of changing multibyte character class.
|
||||||
this_class = mb_get_class(ptr);
|
this_class = mb_get_class(ptr);
|
||||||
while (ptr[col] != NUL
|
while (ptr[col] != NUL // -V781
|
||||||
&& ((i == 0
|
&& ((i == 0
|
||||||
? mb_get_class(ptr + col) == this_class
|
? mb_get_class(ptr + col) == this_class
|
||||||
: mb_get_class(ptr + col) != 0)
|
: mb_get_class(ptr + col) != 0)
|
||||||
|
@@ -3153,11 +3153,7 @@ static void qf_list_entry(qfline_T *qfp, int qf_idx, bool cursel)
|
|||||||
|
|
||||||
if (len > IOSIZE) {
|
if (len > IOSIZE) {
|
||||||
tbuf = xmalloc(len);
|
tbuf = xmalloc(len);
|
||||||
if (tbuf != NULL) {
|
|
||||||
tbuflen = len;
|
tbuflen = len;
|
||||||
} else {
|
|
||||||
tbuf = IObuff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove newlines and leading whitespace from the text. For an
|
// Remove newlines and leading whitespace from the text. For an
|
||||||
|
Reference in New Issue
Block a user