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>
Showing
Please register or sign in to comment