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/event/stream.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/nvim/event/stream.c') diff --git a/src/nvim/event/stream.c b/src/nvim/event/stream.c index 0a4918636a..49b5be23c8 100644 --- a/src/nvim/event/stream.c +++ b/src/nvim/event/stream.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 @@ -37,9 +34,8 @@ int stream_set_blocking(int fd, bool blocking) uv_loop_init(&loop); uv_pipe_init(&loop, &stream, 0); uv_pipe_open(&stream, fd); - int retval = uv_stream_set_blocking(STRUCT_CAST(uv_stream_t, &stream), - blocking); - uv_close(STRUCT_CAST(uv_handle_t, &stream), NULL); + int retval = uv_stream_set_blocking((uv_stream_t *)&stream, blocking); + uv_close((uv_handle_t *)&stream, NULL); uv_run(&loop, UV_RUN_NOWAIT); // not necessary, but couldn't hurt. uv_loop_close(&loop); return retval; @@ -71,12 +67,12 @@ void stream_init(Loop *loop, Stream *stream, int fd, uv_stream_t *uvstream) dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT; SetConsoleMode(stream->uv.tty.handle, dwMode); } - stream->uvstream = STRUCT_CAST(uv_stream_t, &stream->uv.tty); + stream->uvstream = (uv_stream_t *)&stream->uv.tty; } else { #endif uv_pipe_init(&loop->uv, &stream->uv.pipe, 0); uv_pipe_open(&stream->uv.pipe, fd); - stream->uvstream = STRUCT_CAST(uv_stream_t, &stream->uv.pipe); + stream->uvstream = (uv_stream_t *)&stream->uv.pipe; #ifdef MSWIN } #endif -- cgit From bb4b4576e384c71890b4df4fa4f1ae76fad3a59d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 16 Nov 2023 10:55:54 +0800 Subject: refactor: iwyu (#26062) --- src/nvim/event/stream.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/event/stream.c') diff --git a/src/nvim/event/stream.c b/src/nvim/event/stream.c index 49b5be23c8..17c1b0a072 100644 --- a/src/nvim/event/stream.c +++ b/src/nvim/event/stream.c @@ -7,7 +7,6 @@ #include "nvim/event/loop.h" #include "nvim/event/stream.h" #include "nvim/log.h" -#include "nvim/macros.h" #include "nvim/rbuffer.h" #ifdef MSWIN # include "nvim/os/os_win_console.h" -- cgit From 8b428ca8b79ebb7b36c3e403ff3bcb6924a635a6 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 16:00:21 +0100 Subject: build(IWYU): fix includes for func_attr.h --- src/nvim/event/stream.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/event/stream.c') diff --git a/src/nvim/event/stream.c b/src/nvim/event/stream.c index 17c1b0a072..aff116bad9 100644 --- a/src/nvim/event/stream.c +++ b/src/nvim/event/stream.c @@ -6,6 +6,7 @@ #include "nvim/event/loop.h" #include "nvim/event/stream.h" +#include "nvim/func_attr.h" #include "nvim/log.h" #include "nvim/rbuffer.h" #ifdef MSWIN -- cgit