aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-12 13:13:58 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-12 21:26:39 +0100
commit353a4be7e84fdc101318215bdcc8a7e780d737fe (patch)
treead75dc836a028d1e3596e9b09ad5d1bc118d0c01 /src/nvim/regexp.c
parent2a57613b9b4206cc627efa63012aac791b8f89e0 (diff)
downloadrneovim-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 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index c908f94e5d..8151d2e12a 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.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
-
// Handling of regular expressions: vim_regcomp(), vim_regexec(), vim_regsub()
// By default: do not create debugging logs or files related to regular
@@ -1004,7 +1001,7 @@ static int64_t getoctchrs(void)
int c;
int i;
- for (i = 0; i < 3 && nr < 040; i++) { // -V536
+ for (i = 0; i < 3 && nr < 040; i++) {
c = (uint8_t)regparse[0];
if (c < '0' || c > '7') {
break;
@@ -2301,7 +2298,7 @@ char *reg_submatch(int no)
}
len += rsm.sm_mmatch->endpos[no].col;
if (round == 2) {
- retval[len] = NUL; // -V595
+ retval[len] = NUL;
}
len++;
}
@@ -2583,7 +2580,6 @@ static void init_regexec_multi(regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_
#define UPPER 47 // Match uppercase char
#define NUPPER 48 // Match non-uppercase char
#define LAST_NL NUPPER + ADD_NL
-// -V:WITH_NL:560
#define WITH_NL(op) ((op) >= FIRST_NL && (op) <= LAST_NL)
#define MOPEN 80 // -89 Mark this point in input as start of
@@ -9818,7 +9814,7 @@ static int nfa_regatom(void)
case Magic('|'):
case Magic('&'):
case Magic(')'):
- semsg(_(e_misplaced), (char)no_Magic(c)); // -V1037
+ semsg(_(e_misplaced), (char)no_Magic(c));
return FAIL;
case Magic('='):
@@ -12911,7 +12907,7 @@ skip_add:
if (state->c == NFA_ZSTART) {
subidx = 0;
sub = &subs->norm;
- } else if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) { // -V560
+ } else if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) {
subidx = state->c - NFA_ZOPEN;
sub = &subs->synt;
} else {
@@ -12966,7 +12962,7 @@ skip_add:
break;
}
// "subs" may have changed, need to set "sub" again.
- if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) { // -V560
+ if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9) {
sub = &subs->synt;
} else {
sub = &subs->norm;
@@ -13016,7 +13012,7 @@ skip_add:
if (state->c == NFA_ZEND) {
subidx = 0;
sub = &subs->norm;
- } else if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) { // -V560
+ } else if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) {
subidx = state->c - NFA_ZCLOSE;
sub = &subs->synt;
} else {
@@ -13054,7 +13050,7 @@ skip_add:
break;
}
// "subs" may have changed, need to set "sub" again.
- if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) { // -V560
+ if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9) {
sub = &subs->synt;
} else {
sub = &subs->norm;