From 7190dba017e3aac0409c73ff1c954d18858cb3c9 Mon Sep 17 00:00:00 2001 From: ii14 <59243201+ii14@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:39:50 +0200 Subject: refactor: remove use of reserved c++ keywords libnvim couldn't be easily used in C++ due to the use of reserved keywords. Additionally, add explicit casts to *alloc function calls used in inline functions, as C++ doesn't allow implicit casts from void pointers. --- test/unit/fixtures/multiqueue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/unit/fixtures') diff --git a/test/unit/fixtures/multiqueue.c b/test/unit/fixtures/multiqueue.c index a8dca0a844..4f4f5989d9 100644 --- a/test/unit/fixtures/multiqueue.c +++ b/test/unit/fixtures/multiqueue.c @@ -7,13 +7,13 @@ #include "multiqueue.h" -void ut_multiqueue_put(MultiQueue *this, const char *str) +void ut_multiqueue_put(MultiQueue *self, const char *str) { - multiqueue_put(this, NULL, 1, str); + multiqueue_put(self, NULL, 1, str); } -const char *ut_multiqueue_get(MultiQueue *this) +const char *ut_multiqueue_get(MultiQueue *self) { - Event event = multiqueue_get(this); + Event event = multiqueue_get(self); return event.argv[0]; } -- cgit 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. --- test/unit/fixtures/multiqueue.c | 3 --- test/unit/fixtures/rbuffer.c | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'test/unit/fixtures') 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 #include #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); } -- cgit