From 353a4be7e84fdc101318215bdcc8a7e780d737fe Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 13:13:58 +0100 Subject: build: remove PVS We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable. --- src/nvim/tui/input.c | 3 --- src/nvim/tui/terminfo.c | 3 --- src/nvim/tui/terminfo_defs.h | 3 --- src/nvim/tui/tui.c | 14 +++++--------- 4 files changed, 5 insertions(+), 18 deletions(-) (limited to 'src/nvim/tui') diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index 4ebf9177de..36d6566c7d 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -1,6 +1,3 @@ -// 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 #include #include diff --git a/src/nvim/tui/terminfo.c b/src/nvim/tui/terminfo.c index d630a34ce2..ff636fb839 100644 --- a/src/nvim/tui/terminfo.c +++ b/src/nvim/tui/terminfo.c @@ -1,6 +1,3 @@ -// 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 - // Built-in fallback terminfo entries. #include diff --git a/src/nvim/tui/terminfo_defs.h b/src/nvim/tui/terminfo_defs.h index 0bc4972dd3..d010b41574 100644 --- a/src/nvim/tui/terminfo_defs.h +++ b/src/nvim/tui/terminfo_defs.h @@ -1,6 +1,3 @@ -// 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 - // uncrustify:off // diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 260bf55093..177ef0c3cf 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1,6 +1,3 @@ -// 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 - // Terminal UI functions. Invoked (by ui_client.c) on the UI process. #include @@ -439,7 +436,7 @@ static void tui_terminal_after_startup(TUIData *tui) /// stop the terminal but allow it to restart later (like after suspend) static void tui_terminal_stop(TUIData *tui) { - if (uv_is_closing(STRUCT_CAST(uv_handle_t, &tui->output_handle))) { + if (uv_is_closing((uv_handle_t *)&tui->output_handle)) { // Race between SIGCONT (tui.c) and SIGHUP (os/signal.c)? #8075 ELOG("TUI already stopped (race?)"); tui->stopped = true; @@ -1174,9 +1171,8 @@ void tui_mode_change(TUIData *tui, String mode, Integer mode_idx) tui->showing_mode = (ModeShape)mode_idx; } -void tui_grid_scroll(TUIData *tui, Integer g, Integer startrow, // -V751 - Integer endrow, Integer startcol, Integer endcol, Integer rows, - Integer cols FUNC_ATTR_UNUSED) +void tui_grid_scroll(TUIData *tui, Integer g, Integer startrow, Integer endrow, Integer startcol, + Integer endcol, Integer rows, Integer cols FUNC_ATTR_UNUSED) { UGrid *grid = &tui->grid; int top = (int)startrow, bot = (int)endrow - 1; @@ -2250,8 +2246,8 @@ static void flush_buf(TUIData *tui) fwrite(bufs[i].base, bufs[i].len, 1, tui->screenshot); } } else { - int ret = uv_write(&req, STRUCT_CAST(uv_stream_t, &tui->output_handle), - bufs, (unsigned)(bufp - bufs), NULL); + int ret + = uv_write(&req, (uv_stream_t *)&tui->output_handle, bufs, (unsigned)(bufp - bufs), NULL); if (ret) { ELOG("uv_write failed: %s", uv_strerror(ret)); } -- cgit