From: Dave Cheney Date: Mon, 13 Mar 2017 03:30:44 +0000 (+1100) Subject: cmd/compile/internal/gc: remove unused exportsize variable X-Git-Tag: go1.9beta1~1195 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=dd0e1acfeb50f33f79738b2ef7e21a61ecec9d22;p=gostls13.git cmd/compile/internal/gc: remove unused exportsize variable In Go 1.7 and earlier, gc.exportsize tracked the number of bytes written through exportf. With the removal of the old exporter in Go 1.8 exportf is only used for printing the build id, and the header and trailer of the binary export format. The size of the export data is now returned directly from the exporter and exportsize is never referenced. Remove it. Change-Id: Id301144b3c26c9004c722d0c55c45b0e0801a88c Reviewed-on: https://go-review.googlesource.com/38116 Run-TryBot: Dave Cheney TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/compile/internal/gc/export.go b/src/cmd/compile/internal/gc/export.go index f39dd2bee7..b42c1aa601 100644 --- a/src/cmd/compile/internal/gc/export.go +++ b/src/cmd/compile/internal/gc/export.go @@ -15,12 +15,10 @@ import ( var ( Debug_export int // if set, print debugging information about export data - exportsize int ) func exportf(format string, args ...interface{}) { - n, _ := fmt.Fprintf(bout, format, args...) - exportsize += n + fmt.Fprintf(bout, format, args...) if Debug_export != 0 { fmt.Printf(format, args...) }