]> Cypherpunks repositories - gostls13.git/commitdiff
vet: fix test_deadcode.go's tests
authorRob Pike <r@golang.org>
Wed, 27 Mar 2013 23:30:20 +0000 (16:30 -0700)
committerRob Pike <r@golang.org>
Wed, 27 Mar 2013 23:30:20 +0000 (16:30 -0700)
This is a totally mechanical change.
Errors are reported for the beginning of the statement, not the end,
so the errchk markers need to be on the opening brace, not the closing
one. It seems this test was never run.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7746050

src/cmd/vet/test_deadcode.go

index 3ded80ca2373d4fef6d9f8acb9057533890b4e03..d08e57782f834988f801abc09b4792ac0da4c4c2 100644 (file)
@@ -112,31 +112,31 @@ func _() int {
 func _() int {
        print(1)
        return 2
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 func _() int {
 L:
        print(1)
        goto L
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 func _() int {
        print(1)
        panic(2)
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 func _() int {
        {
                print(1)
                return 2
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
 }
 
@@ -145,8 +145,8 @@ L:
        {
                print(1)
                goto L
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
 }
 
@@ -154,8 +154,8 @@ func _() int {
        print(1)
        {
                panic(2)
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
 }
 
@@ -164,8 +164,8 @@ func _() int {
                print(1)
                return 2
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 func _() int {
@@ -174,8 +174,8 @@ L:
                print(1)
                goto L
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 func _() int {
@@ -183,8 +183,8 @@ func _() int {
        {
                panic(2)
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 func _() int {
@@ -991,31 +991,31 @@ func _() int {
 
 func _() int {
        return 2
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
 func _() int {
 L:
        goto L
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
 func _() int {
        panic(2)
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
 func _() int {
        {
                return 2
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
        println() // ok
 }
@@ -1024,8 +1024,8 @@ func _() int {
 L:
        {
                goto L
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
        println() // ok
 }
@@ -1033,8 +1033,8 @@ L:
 func _() int {
        {
                panic(2)
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
        println() // ok
 }
@@ -1043,8 +1043,8 @@ func _() int {
        {
                return 2
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
@@ -1053,8 +1053,8 @@ L:
        {
                goto L
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
@@ -1062,8 +1062,8 @@ func _() int {
        {
                panic(2)
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
@@ -1165,31 +1165,31 @@ var _ = func() int {
 var _ = func() int {
        print(1)
        return 2
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 var _ = func() int {
 L:
        print(1)
        goto L
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 var _ = func() int {
        print(1)
        panic(2)
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 var _ = func() int {
        {
                print(1)
                return 2
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
 }
 
@@ -1198,8 +1198,8 @@ L:
        {
                print(1)
                goto L
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
 }
 
@@ -1207,8 +1207,8 @@ var _ = func() int {
        print(1)
        {
                panic(2)
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
 }
 
@@ -1217,8 +1217,8 @@ var _ = func() int {
                print(1)
                return 2
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 var _ = func() int {
@@ -1227,8 +1227,8 @@ L:
                print(1)
                goto L
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 var _ = func() int {
@@ -1236,8 +1236,8 @@ var _ = func() int {
        {
                panic(2)
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
 }
 
 var _ = func() int {
@@ -2044,31 +2044,31 @@ var _ = func() int {
 
 var _ = func() int {
        return 2
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
 var _ = func() int {
 L:
        goto L
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
 var _ = func() int {
        panic(2)
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
 var _ = func() int {
        {
                return 2
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
        println() // ok
 }
@@ -2077,8 +2077,8 @@ var _ = func() int {
 L:
        {
                goto L
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
        println() // ok
 }
@@ -2086,8 +2086,8 @@ L:
 var _ = func() int {
        {
                panic(2)
-               {
-               } // ERROR "unreachable code"
+               { // ERROR "unreachable code"
+               }
        }
        println() // ok
 }
@@ -2096,8 +2096,8 @@ var _ = func() int {
        {
                return 2
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
@@ -2106,8 +2106,8 @@ L:
        {
                goto L
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }
 
@@ -2115,7 +2115,7 @@ var _ = func() int {
        {
                panic(2)
        }
-       {
-       } // ERROR "unreachable code"
+       { // ERROR "unreachable code"
+       }
        println() // ok
 }