mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +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:
@@ -2449,7 +2449,7 @@ bool autocmd_delete_id(int64_t id)
|
||||
|
||||
// Note that since multiple AutoCmd objects can have the same ID, we need to do a full scan.
|
||||
FOR_ALL_AUEVENTS(event) {
|
||||
FOR_ALL_AUPATS_IN_EVENT(event, ap) {
|
||||
FOR_ALL_AUPATS_IN_EVENT(event, ap) { // -V756
|
||||
for (AutoCmd *ac = ap->cmds; ac != NULL; ac = ac->next) {
|
||||
if (ac->id == id) {
|
||||
aucmd_del(ac);
|
||||
|
Reference in New Issue
Block a user