diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-07-08 20:04:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 11:04:46 -0700 |
commit | 980d50d90e4da98f8d448cbb7b8dd76d6fd1394b (patch) | |
tree | 0bf384b0fe1795cc53ab06d204e97f915dd4b4da /src | |
parent | 4339f528dbebc4a7cc6aeb4bb3069757cc91ea9b (diff) | |
download | rneovim-980d50d90e4da98f8d448cbb7b8dd76d6fd1394b.tar.gz rneovim-980d50d90e4da98f8d448cbb7b8dd76d6fd1394b.tar.bz2 rneovim-980d50d90e4da98f8d448cbb7b8dd76d6fd1394b.zip |
vim-patch:8.2.3125: variables are set but not used #15028
Problem: Variables are set but not used.
Solution: Move the declarations to the block where they are used.
(closes vim/vim#8527)
https://github.com/vim/vim/commit/09f688c33aad9692276dfb68842cf0621a0e2002
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/regexp_nfa.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index 35c3285cda..039f9b4675 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -1161,8 +1161,6 @@ static int nfa_regatom(void) int emit_range; int negated; int startc = -1; - int endc = -1; - int oldstartc = -1; int save_prev_at_start = prev_at_start; c = getchr(); @@ -1572,7 +1570,7 @@ collection: * Failed to recognize a character class. Use the simple * version that turns [abc] into 'a' OR 'b' OR 'c' */ - startc = endc = oldstartc = -1; + startc = -1; negated = false; if (*regparse == '^') { // negated range negated = true; @@ -1589,7 +1587,7 @@ collection: // Emit the OR branches for each character in the [] emit_range = false; while (regparse < endp) { - oldstartc = startc; + int oldstartc = startc; startc = -1; got_coll_char = false; if (*regparse == '[') { @@ -1729,7 +1727,7 @@ collection: /* Previous char was '-', so this char is end of range. */ if (emit_range) { - endc = startc; + int endc = startc; startc = oldstartc; if (startc > endc) { EMSG_RET_FAIL(_(e_reverse_range)); |