Commit ed97788a authored by Rui Ueyama's avatar Rui Ueyama Committed by Brad Fitzpatrick

regexp: remove unused variables

"min" and "max" in "case '{'" clause are fresh variables.
The variables defined in the outer scope never get value
other than 0.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/78750044
parent b89a9fff
...@@ -668,7 +668,6 @@ func Parse(s string, flags Flags) (*Regexp, error) { ...@@ -668,7 +668,6 @@ func Parse(s string, flags Flags) (*Regexp, error) {
c rune c rune
op Op op Op
lastRepeat string lastRepeat string
min, max int
) )
p.flags = flags p.flags = flags
p.wholeRegexp = s p.wholeRegexp = s
...@@ -740,7 +739,7 @@ func Parse(s string, flags Flags) (*Regexp, error) { ...@@ -740,7 +739,7 @@ func Parse(s string, flags Flags) (*Regexp, error) {
op = OpQuest op = OpQuest
} }
after := t[1:] after := t[1:]
if after, err = p.repeat(op, min, max, before, after, lastRepeat); err != nil { if after, err = p.repeat(op, 0, 0, before, after, lastRepeat); err != nil {
return nil, err return nil, err
} }
repeat = before repeat = before
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment