• Ian Lance Taylor's avatar
    cmd/cgo, misc/cgo/test: make -Wdeclaration-after-statement clean · e50346d2
    Ian Lance Taylor authored
    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: default avatarMinux Ma <minux@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    e50346d2
out.go 43.9 KB