diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-12 13:13:58 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-12 21:26:39 +0100 |
commit | 353a4be7e84fdc101318215bdcc8a7e780d737fe (patch) | |
tree | ad75dc836a028d1e3596e9b09ad5d1bc118d0c01 /test | |
parent | 2a57613b9b4206cc627efa63012aac791b8f89e0 (diff) | |
download | rneovim-353a4be7e84fdc101318215bdcc8a7e780d737fe.tar.gz rneovim-353a4be7e84fdc101318215bdcc8a7e780d737fe.tar.bz2 rneovim-353a4be7e84fdc101318215bdcc8a7e780d737fe.zip |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/fixtures/printargs-test.c | 3 | ||||
-rw-r--r-- | test/functional/fixtures/printenv-test.c | 3 | ||||
-rw-r--r-- | test/functional/fixtures/shell-test.c | 3 | ||||
-rw-r--r-- | test/functional/fixtures/streams-test.c | 3 | ||||
-rw-r--r-- | test/functional/fixtures/tty-test.c | 11 | ||||
-rw-r--r-- | test/old/memfile_test.c | 3 | ||||
-rw-r--r-- | test/unit/fixtures/multiqueue.c | 3 | ||||
-rw-r--r-- | test/unit/fixtures/rbuffer.c | 5 |
8 files changed, 4 insertions, 30 deletions
diff --git a/test/functional/fixtures/printargs-test.c b/test/functional/fixtures/printargs-test.c index be54605817..2c25cf8447 100644 --- a/test/functional/fixtures/printargs-test.c +++ b/test/functional/fixtures/printargs-test.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 <stdio.h> int main(int argc, char **argv) diff --git a/test/functional/fixtures/printenv-test.c b/test/functional/fixtures/printenv-test.c index 295b4f04c3..f826a28db4 100644 --- a/test/functional/fixtures/printenv-test.c +++ b/test/functional/fixtures/printenv-test.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 <stdio.h> #ifdef MSWIN diff --git a/test/functional/fixtures/shell-test.c b/test/functional/fixtures/shell-test.c index 4196716799..ef9f23e3f9 100644 --- a/test/functional/fixtures/shell-test.c +++ b/test/functional/fixtures/shell-test.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 <stdio.h> #include <string.h> #include <stdint.h> diff --git a/test/functional/fixtures/streams-test.c b/test/functional/fixtures/streams-test.c index be40edfe7e..5a59abb33b 100644 --- a/test/functional/fixtures/streams-test.c +++ b/test/functional/fixtures/streams-test.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 - /// Helper program to exit and keep stdout open (like "xclip -i -loops 1"). #include <stdio.h> diff --git a/test/functional/fixtures/tty-test.c b/test/functional/fixtures/tty-test.c index 6ee7715021..f94af2fd12 100644 --- a/test/functional/fixtures/tty-test.c +++ b/test/functional/fixtures/tty-test.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 <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -11,8 +8,6 @@ # include <unistd.h> #endif -// -V:STRUCT_CAST:641 -#define STRUCT_CAST(Type, obj) ((Type *)(obj)) #define is_terminal(stream) (uv_guess_handle(fileno(stream)) == UV_TTY) #define BUF_SIZE 0xfff #define CTRL_C 0x03 @@ -108,10 +103,10 @@ static void read_cb(uv_stream_t *stream, ssize_t cnt, const uv_buf_t *buf) .len = (size_t)cnt #endif }; - uv_write(&req, STRUCT_CAST(uv_stream_t, &out), &b, 1, NULL); + uv_write(&req, (uv_stream_t *)&out, &b, 1, NULL); uv_run(&write_loop, UV_RUN_DEFAULT); - uv_close(STRUCT_CAST(uv_handle_t, &out), NULL); + uv_close((uv_handle_t *)&out, NULL); uv_run(&write_loop, UV_RUN_DEFAULT); if (uv_loop_close(&write_loop)) { abort(); @@ -181,7 +176,7 @@ int main(int argc, char **argv) #endif uv_tty_set_mode(&tty, UV_TTY_MODE_RAW); tty.data = &interrupted; - uv_read_start(STRUCT_CAST(uv_stream_t, &tty), alloc_cb, read_cb); + uv_read_start((uv_stream_t *)&tty, alloc_cb, read_cb); #ifndef MSWIN struct sigaction sa; sigemptyset(&sa.sa_mask); diff --git a/test/old/memfile_test.c b/test/old/memfile_test.c index 41316bcc2d..a352619469 100644 --- a/test/old/memfile_test.c +++ b/test/old/memfile_test.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 - /* vi:set ts=8 sts=4 sw=4 noet: * * VIM - Vi IMproved by Bram Moolenaar diff --git a/test/unit/fixtures/multiqueue.c b/test/unit/fixtures/multiqueue.c index 4f4f5989d9..3a5ddab4b8 100644 --- a/test/unit/fixtures/multiqueue.c +++ b/test/unit/fixtures/multiqueue.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 <string.h> #include <stdlib.h> #include "nvim/event/multiqueue.h" diff --git a/test/unit/fixtures/rbuffer.c b/test/unit/fixtures/rbuffer.c index efa7ab1986..d587d6b054 100644 --- a/test/unit/fixtures/rbuffer.c +++ b/test/unit/fixtures/rbuffer.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 "nvim/rbuffer.h" #include "rbuffer.h" @@ -15,7 +12,7 @@ void ut_rbuffer_each_read_chunk(RBuffer *buf, each_ptr_cb cb) void ut_rbuffer_each_write_chunk(RBuffer *buf, each_ptr_cb cb) { - RBUFFER_UNTIL_FULL(buf, wptr, wcnt) { // -V1044 + RBUFFER_UNTIL_FULL(buf, wptr, wcnt) { cb(wptr, wcnt); rbuffer_produced(buf, wcnt); } |