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:
parent
b89a9fff5e
commit
ed97788af9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user