aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-11-12 11:22:10 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-15 12:48:28 +0100
commit78b49ce950b31df8b5ee6788c84b3d439a982d59 (patch)
treee5eecc0fa21ef830a128756631b6355db63d9e57
parent83a32aad82f87fda3d8a5984ebf627213c18177a (diff)
downloadrneovim-78b49ce950b31df8b5ee6788c84b3d439a982d59.tar.gz
rneovim-78b49ce950b31df8b5ee6788c84b3d439a982d59.tar.bz2
rneovim-78b49ce950b31df8b5ee6788c84b3d439a982d59.zip
Fix warnings: regexp_nfa.c: nfa_regatom(): Dead assignment: HI.
Problem : Dead assignment @ 1554. Diagnostic : Harmless issue. Rationale : `result` is used when analyzing if a bracketed expresion `[<whatever>]` can be condensed into a character class. Not used for anything else anywhere. So, it's safe to remove. Resolution : Remove dead assingment and move declaration of `result` to the scope where it's used.
-rw-r--r--src/nvim/regexp_nfa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 9ae1740627..60cdc12c92 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1084,7 +1084,6 @@ static int nfa_regatom(void)
int extra = 0;
int emit_range;
int negated;
- int result;
int startc = -1;
int endc = -1;
int oldstartc = -1;
@@ -1452,8 +1451,8 @@ collection:
* recognize that [0-9] stands for \d and [A-Za-z_] for \h,
* and perform the necessary substitutions in the NFA.
*/
- result = nfa_recognize_char_class(regparse, endp,
- extra == NFA_ADD_NL);
+ int result = nfa_recognize_char_class(regparse, endp,
+ extra == NFA_ADD_NL);
if (result != FAIL) {
if (result >= NFA_FIRST_NL && result <= NFA_LAST_NL) {
EMIT(result - NFA_ADD_NL);
@@ -1557,7 +1556,6 @@ collection:
/* Try equivalence class [=a=] and the like */
if (equiclass != 0) {
nfa_emit_equi_class(equiclass);
- result = OK;
continue;
}
/* Try collating class like [. .] */