mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
fix/PVS #17863
* fix(PVS/V002): disable rule completely V002: "Some diagnostic messages may contain incorrect line number in this file." This particular check seems unreliable. It says on their website https://pvs-studio.com/en/docs/warnings/v002/ that this warning occurs when there are multiline pragmas, but there are none in extmark.c. * fix(PVS/V756): ignore "counter is not used inside a nested loop" warning The nested loop starts with "AutoCmd *ac = ap->cmds" so "ap" is definitely used. * fix(PVS/V560): disable "a part of conditional expression is always true" * fix(PVS/V614): potentially uninitialized variable 'blen' used
This commit is contained in:
@@ -2752,6 +2752,7 @@ static void truncate_fold(win_T *const wp, fold_T *fp, linenr_T end)
|
||||
}
|
||||
|
||||
#define FOLD_END(fp) ((fp)->fd_top + (fp)->fd_len - 1)
|
||||
// -V:VALID_FOLD:V560
|
||||
#define VALID_FOLD(fp, gap) \
|
||||
((gap)->ga_len > 0 && (fp) < ((fold_T *)(gap)->ga_data + (gap)->ga_len))
|
||||
#define FOLD_INDEX(fp, gap) ((size_t)((fp) - ((fold_T *)(gap)->ga_data)))
|
||||
|
Reference in New Issue
Block a user