From 09f688c33aad9692276dfb68842cf0621a0e2002 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=3D=3FUTF-8=3Fq=3FDundar=3D20G=3DC3=3DB6c=3F=3D?= Date: Thu, 8 Jul 2021 18:05:00 +0200 Subject: [PATCH] patch 8.2.3125: variables are set but not used Problem: Variables are set but not used. Solution: Move the declarations to the block where they are used. (closes #8527) --- src/regexp_nfa.c | 10 +++++----- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 7dff195ea..db629def7 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -1371,8 +1371,6 @@ nfa_regatom(void) int negated; int result; int startc = -1; - int endc = -1; - int oldstartc = -1; int save_prev_at_start = prev_at_start; c = getchr(); @@ -1838,7 +1836,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 { @@ -1859,7 +1857,8 @@ collection: emit_range = FALSE; while (regparse < endp) { - oldstartc = startc; + int oldstartc = startc; + startc = -1; got_coll_char = FALSE; if (*regparse == '[') @@ -2017,7 +2016,8 @@ 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)); diff --git a/src/version.c b/src/version.c index 1fb224326..117051ffb 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3125, /**/ 3124, /**/ -- 2.50.1