From 0ebfa231d21b255d84cfdb8a618cfe397db6c497 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 15 Sep 2009 09:41:59 -0700 Subject: more "declared and not used". the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638 --- src/pkg/regexp/regexp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/regexp/regexp.go') diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index b378a669c..b1baf67c7 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -868,7 +868,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string { lastMatchEnd = a[1]; // Advance past this match; always advance at least one character. - rune, width := utf8.DecodeRuneInString(src[searchPos:len(src)]); + _, width := utf8.DecodeRuneInString(src[searchPos:len(src)]); if searchPos + width > a[1] { searchPos += width; } else if searchPos + 1 > a[1] { @@ -912,7 +912,7 @@ func (re *Regexp) ReplaceAll(src, repl []byte) []byte { lastMatchEnd = a[1]; // Advance past this match; always advance at least one character. - rune, width := utf8.DecodeRune(src[searchPos:len(src)]); + _, width := utf8.DecodeRune(src[searchPos:len(src)]); if searchPos + width > a[1] { searchPos += width; } else if searchPos + 1 > a[1] { -- cgit v1.2.3