mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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)
09f688c33a
This commit is contained in:
parent
4339f528db
commit
980d50d90e
@ -1161,8 +1161,6 @@ static int nfa_regatom(void)
|
|||||||
int emit_range;
|
int emit_range;
|
||||||
int negated;
|
int negated;
|
||||||
int startc = -1;
|
int startc = -1;
|
||||||
int endc = -1;
|
|
||||||
int oldstartc = -1;
|
|
||||||
int save_prev_at_start = prev_at_start;
|
int save_prev_at_start = prev_at_start;
|
||||||
|
|
||||||
c = getchr();
|
c = getchr();
|
||||||
@ -1572,7 +1570,7 @@ collection:
|
|||||||
* Failed to recognize a character class. Use the simple
|
* Failed to recognize a character class. Use the simple
|
||||||
* version that turns [abc] into 'a' OR 'b' OR 'c'
|
* version that turns [abc] into 'a' OR 'b' OR 'c'
|
||||||
*/
|
*/
|
||||||
startc = endc = oldstartc = -1;
|
startc = -1;
|
||||||
negated = false;
|
negated = false;
|
||||||
if (*regparse == '^') { // negated range
|
if (*regparse == '^') { // negated range
|
||||||
negated = true;
|
negated = true;
|
||||||
@ -1589,7 +1587,7 @@ collection:
|
|||||||
// Emit the OR branches for each character in the []
|
// Emit the OR branches for each character in the []
|
||||||
emit_range = false;
|
emit_range = false;
|
||||||
while (regparse < endp) {
|
while (regparse < endp) {
|
||||||
oldstartc = startc;
|
int oldstartc = startc;
|
||||||
startc = -1;
|
startc = -1;
|
||||||
got_coll_char = false;
|
got_coll_char = false;
|
||||||
if (*regparse == '[') {
|
if (*regparse == '[') {
|
||||||
@ -1729,7 +1727,7 @@ collection:
|
|||||||
|
|
||||||
/* Previous char was '-', so this char is end of range. */
|
/* Previous char was '-', so this char is end of range. */
|
||||||
if (emit_range) {
|
if (emit_range) {
|
||||||
endc = startc;
|
int endc = startc;
|
||||||
startc = oldstartc;
|
startc = oldstartc;
|
||||||
if (startc > endc) {
|
if (startc > endc) {
|
||||||
EMSG_RET_FAIL(_(e_reverse_range));
|
EMSG_RET_FAIL(_(e_reverse_range));
|
||||||
|
Loading…
Reference in New Issue
Block a user