-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
staticcheck: cgo: SA4000 false positive on generated 0 == 0
#430
Comments
I was thinking for a moment that this can be a fault of |
When will the evils of shadowing end? |
Part of me wishes for a way to refer to outer scopes, and the universe scope, explicitly. But I worry that would only make things worse :-) |
@dominikh You can kind–of–sort–of do that. See my comment on the Go issue tracker. Stinky, but works. |
@dominikh Thanks! |
This code
gives a false positive error
identical expressions on the left and right side of the '==' operator (SA4000)
pointing beyond the end of the lineC.foo(&p)
.The reason is that
cgo
generates the following Go codeSo
staticcheck
actually complains on0 == 0
expression generated bycgo
.The text was updated successfully, but these errors were encountered: