Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: gcc warns about _beginthreadex parameter #15623

Closed
alexbrainman opened this issue May 10, 2016 · 3 comments
Closed

runtime: gcc warns about _beginthreadex parameter #15623

alexbrainman opened this issue May 10, 2016 · 3 comments

Comments

@alexbrainman
Copy link
Member

Maybe it is not important. But so I don't forget. Failure during TryBots build run of CL 22933:

https://storage.googleapis.com/go-build-log/280cb325/windows-386-gce_045bb639.log

--- FAIL: TestCgoCrashHandler (5.40s)
    crash_test.go:66: building testprogcgo: exit status 2
        # _/C_/workdir/go/src/runtime/testdata/testprogcgo
        .\threadpanic_windows.c: In function 'start':
        .\threadpanic_windows.c:21:26: warning: passing argument 3 of '_beginthreadex' from incompatible pointer type
          if(_beginthreadex(0, 0, die, 0, 0, 0) != 0)
                                  ^
        In file included from .\threadpanic_windows.c:5:0:
        C:/TDM-GCC-32/include/process.h:100:2: note: expected 'unsigned int (__attribute__((__stdcall__)) *)(void *)' but argument is of type 'unsigned int (*)(void *)'
          _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *), 
          ^

And

static unsigned int __attribute__((__stdcall__))
die(void* x)
{
    ...
}

gets rid of this warning on my windows/386.

Alex

@bradfitz bradfitz added this to the Go1.7Maybe milestone May 10, 2016
@bradfitz
Copy link
Contributor

Related: #14698

@bradfitz
Copy link
Contributor

Yup, I hit this in https://go-review.googlesource.com/23005

@gopherbot
Copy link

CL https://golang.org/cl/23010 mentions this issue.

@golang golang locked and limited conversation to collaborators May 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants