From 793496aecc23fdee93040fc94ca3e1a66da73039 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 15 May 2022 15:04:56 +0200 Subject: fix PVS warnings (#18459) * fix(PVS/V547): remove ifs that are always true or false * fix(PVS/V560): remove partial conditions that are always true * fix(PVS/V1044): suppress warning about loop break conditions * fix(PVS/V1063): suppress "modulo by 1 operation is meaningless" * fix(PVS/V568): suppress "operator evaluates the size of a pointer" Also mark vim-patch:8.2.4958 as ported. --- src/nvim/strings.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/strings.c') diff --git a/src/nvim/strings.c b/src/nvim/strings.c index de1c8b9c36..55b4628c9e 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -637,9 +637,9 @@ static const void *tv_ptr(const typval_T *const tvs, int *const idxp) STATIC_ASSERT(OFF(v_string) == OFF(v_list) && OFF(v_string) == OFF(v_dict) && OFF(v_string) == OFF(v_partial) - && sizeof(tvs[0].vval.v_string) == sizeof(tvs[0].vval.v_list) - && sizeof(tvs[0].vval.v_string) == sizeof(tvs[0].vval.v_dict) - && sizeof(tvs[0].vval.v_string) == sizeof(tvs[0].vval.v_partial), + && sizeof(tvs[0].vval.v_string) == sizeof(tvs[0].vval.v_list) // -V568 + && sizeof(tvs[0].vval.v_string) == sizeof(tvs[0].vval.v_dict) // -V568 + && sizeof(tvs[0].vval.v_string) == sizeof(tvs[0].vval.v_partial), // -V568 "Strings, dictionaries, lists and partials are expected to be pointers, " "so that all three of them can be accessed via v_string"); #undef OFF -- cgit