From 0aa16dbd180e920ed0de7bde383e01219746ba14 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 5 Jun 2021 12:46:43 -0400 Subject: regexp: pvs/v1071 "void" cast unused return values of getchr(), peekchr(). --- src/nvim/regexp.c | 2 +- src/nvim/regexp_nfa.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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); -- cgit