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

cgo: gcc_sigaction.c: warning: comparison between signed and unsigned integer expressions #25411

Closed
duzy opened this issue May 16, 2018 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@duzy
Copy link

duzy commented May 16, 2018

What version of Go are you using (go version)?

$ go version
go version go1.10.1 linux/amd64

Does this issue reproduce with the latest release?

I think so.

What operating system and processor architecture are you using (go env)?

Linux (Alpine)

What did you do?

Building code with c/c++ code (cgo), got:

gcc_sigaction.c: In function 'x_cgo_sigaction':
gcc_sigaction.c:50:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (i = 0; i < 8 * sizeof(goact->mask); i++) {
                 ^
gcc_sigaction.c:72:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (i = 0; i < 8 * sizeof(oldgoact->mask); i++) {

What did you expect to see?

These warnings are annoying and should be fixed please, though not causing any bug so far.

What did you see instead?

The above unexpected warnings.

@gopherbot
Copy link

Change https://golang.org/cl/113335 mentions this issue: runtime/cgo: use size_t in sizeof result comparison

@agnivade agnivade added the NeedsFix The path to resolution is known, but the work has not been done. label May 16, 2018
@agnivade agnivade added this to the Go1.11 milestone May 16, 2018
@golang golang locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants