-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/cgo: fix unused parameter warnings in generated _cgo_main.c #46358
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
Conversation
Applying -Werror compiler option to request warnings is an usual way to discover potential errors. Go user may put a cgo directive in preamble: `// #cgo CFLAGS: -Werror=unused-parameter`. However, the directive also takes effect on the cgo generated files. I cleaned _cgo_main.c to help Go user only concentrate on warnings of their own file. Fixes golang#43639
This PR (HEAD: f09d172) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/322232 to see it. Tip: You can toggle comments from me using the |
Message from Bryan C. Mills: Patch Set 3: Run-TryBot+1 Code-Review+1 Trust+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Go Bot: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Go Bot: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Go Bot: Patch Set 3: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Hans Allen: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Ian Lance Taylor: Patch Set 4: Patch Set 3 was rebased Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Ian Lance Taylor: Patch Set 4: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Message from Go Bot: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/322232. |
Applying -Werror compiler option to request warnings is an usual way to discover potential errors. Go user may put a cgo directive in preamble: `// #cgo CFLAGS: -Werror=unused-parameter`. However, the directive also takes effect on the cgo generated files. I cleaned _cgo_main.c to help Go user only concentrate on warnings of their own file. Fixes #43639 Change-Id: I9112f02ae5226f2fc87a8650d19faee59cddd588 GitHub-Last-Rev: f09d172 GitHub-Pull-Request: #46358 Reviewed-on: https://go-review.googlesource.com/c/go/+/322232 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Trust: Bryan C. Mills <[email protected]>
This PR is being closed because golang.org/cl/322232 has been merged. |
Applying -Werror compiler option to request warnings is an usual
way to discover potential errors. Go user may put a cgo directive
in preamble:
// #cgo CFLAGS: -Werror=unused-parameter
.However, the directive also takes effect on the cgo generated files.
I cleaned _cgo_main.c to help Go user only concentrate on warnings
of their own file.
Fixes #43639