diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-05-15 15:04:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 21:04:56 +0800 |
commit | 793496aecc23fdee93040fc94ca3e1a66da73039 (patch) | |
tree | 2a7de4d94f7c04e0340b595ad059c0e5e49472c1 /src/nvim/rbuffer.h | |
parent | 4c7462fdb313a64d6903809ece2d8d564c0ea420 (diff) | |
download | rneovim-793496aecc23fdee93040fc94ca3e1a66da73039.tar.gz rneovim-793496aecc23fdee93040fc94ca3e1a66da73039.tar.bz2 rneovim-793496aecc23fdee93040fc94ca3e1a66da73039.zip |
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.
Diffstat (limited to 'src/nvim/rbuffer.h')
-rw-r--r-- | src/nvim/rbuffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/rbuffer.h b/src/nvim/rbuffer.h index e86765a4ad..09d6ba3d34 100644 --- a/src/nvim/rbuffer.h +++ b/src/nvim/rbuffer.h @@ -36,6 +36,8 @@ // // Note that the rbuffer_{produced,consumed} calls are necessary or these macros // create infinite loops +// +// -V:RBUFFER_UNTIL_EMPTY:1044 #define RBUFFER_UNTIL_EMPTY(buf, rptr, rcnt) \ for (size_t rcnt = 0, _r = 1; _r; _r = 0) /* NOLINT(readability/braces) */ \ for (char *rptr = rbuffer_read_ptr(buf, &rcnt); /* NOLINT(readability/braces) */ \ |