regexp: pvs/v1071

"void" cast unused return values of getchr(), peekchr().
This commit is contained in:
Jan Edmund Lazo
2021-06-05 12:46:43 -04:00
parent 61e07d98dd
commit 0aa16dbd18
2 changed files with 5 additions and 5 deletions

View File

@@ -2912,7 +2912,7 @@ static int peekchr(void)
at_start = false; // be able to say "/\*ptr" at_start = false; // be able to say "/\*ptr"
regparse++; regparse++;
after_slash++; after_slash++;
peekchr(); (void)peekchr();
regparse--; regparse--;
after_slash--; after_slash--;
curchr = toggle_Magic(curchr); curchr = toggle_Magic(curchr);

View File

@@ -1461,10 +1461,10 @@ static int nfa_regatom(void)
if (nfa_regatom() == FAIL) if (nfa_regatom() == FAIL)
return FAIL; return FAIL;
} }
getchr(); /* get the ] */ (void)getchr(); // get the ]
if (n == 0) if (n == 0) {
EMSG2_RET_FAIL(_(e_empty_sb), EMSG2_RET_FAIL(_(e_empty_sb), reg_magic == MAGIC_ALL);
reg_magic == MAGIC_ALL); }
EMIT(NFA_OPT_CHARS); EMIT(NFA_OPT_CHARS);
EMIT(n); EMIT(n);