]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo, misc/cgo/test: make -Wdeclaration-after-statement clean
authorIan Lance Taylor <iant@golang.org>
Mon, 2 May 2016 00:03:46 +0000 (17:03 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 2 May 2016 04:42:12 +0000 (04:42 +0000)
commite50346d26a935cd43023856d0df65a158d867c00
tree92f3a6e45d619e656885692cdada5fc247badb1d
parent45f39fb46747d0c46bc25e6ef605c00e96e2dc07
cmd/cgo, misc/cgo/test: make -Wdeclaration-after-statement clean

I got a complaint that cgo output triggers warnings with
-Wdeclaration-after-statement.  I don't think it's worth testing for
this--C has permitted declarations after statements since C99--but it is
easy enough to fix.  It may break again; so it goes.

This CL also fixes errno handling to avoid getting confused if the tsan
functions happen to change the global errno variable.

Change-Id: I0ec7c63a6be5653ef44799d134c8d27cb5efa441
Reviewed-on: https://go-review.googlesource.com/22686
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
misc/cgo/test/issue3250.go
misc/cgo/test/issue5986.go
src/cmd/cgo/out.go