aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-05 12:46:43 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-05 12:49:28 -0400
commit0aa16dbd180e920ed0de7bde383e01219746ba14 (patch)
tree2df42fd67f0be68a8ae97650bd431315989e5d17
parent61e07d98ddb9a3f141fc7534b0598b5677c3d004 (diff)
downloadrneovim-0aa16dbd180e920ed0de7bde383e01219746ba14.tar.gz
rneovim-0aa16dbd180e920ed0de7bde383e01219746ba14.tar.bz2
rneovim-0aa16dbd180e920ed0de7bde383e01219746ba14.zip
regexp: pvs/v1071
"void" cast unused return values of getchr(), peekchr().
-rw-r--r--src/nvim/regexp.c2
-rw-r--r--src/nvim/regexp_nfa.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 6b84bb3207..c2ef217638 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -2912,7 +2912,7 @@ static int peekchr(void)
at_start = false; // be able to say "/\*ptr"
regparse++;
after_slash++;
- peekchr();
+ (void)peekchr();
regparse--;
after_slash--;
curchr = toggle_Magic(curchr);
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 5047e0db03..35c3285cda 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1461,10 +1461,10 @@ static int nfa_regatom(void)
if (nfa_regatom() == FAIL)
return FAIL;
}
- getchr(); /* get the ] */
- if (n == 0)
- EMSG2_RET_FAIL(_(e_empty_sb),
- reg_magic == MAGIC_ALL);
+ (void)getchr(); // get the ]
+ if (n == 0) {
+ EMSG2_RET_FAIL(_(e_empty_sb), reg_magic == MAGIC_ALL);
+ }
EMIT(NFA_OPT_CHARS);
EMIT(n);