1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:30:06 -07:00

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
This commit is contained in:
Rui Ueyama 2014-03-22 11:05:40 -07:00 committed by Brad Fitzpatrick
parent b89a9fff5e
commit ed97788af9

View File

@ -668,7 +668,6 @@ func Parse(s string, flags Flags) (*Regexp, error) {
c rune
op Op
lastRepeat string
min, max int
)
p.flags = flags
p.wholeRegexp = s
@ -740,7 +739,7 @@ func Parse(s string, flags Flags) (*Regexp, error) {
op = OpQuest
}
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
}
repeat = before