Change information
Commit message:
runtime/cgo: avoid unused parameter warning
Annotate the unused parameter with `__attribute__((unused))` to avoid
build failures in environments that treat unused parameters as errors.
We see this when using `rules_go`:
```
@@rules_go+//:stdlib
builder failed: error executing GoStdlib command (from stdlib rule target @@rules_go+//:stdlib) bazel-out/linux_host_platform-opt-exec-ST-f2d1f3f5d18d/bin/external/rules_go++go_sdk+main___download_0/builder_reset/builder stdlib -sdk external/rules_go++go_sdk+main___download_0 -goroot ... (remaining 16 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
stderr:
# runtime/cgo
gcc_clearenv.c:13:23: error: unused parameter '_unused' [-Werror,-Wunused-parameter]
stdlib: error running subcommand external/rules_go++go_sdk+main___download_0/bin/go: exit status 1
```
This matches the style used in `src/runtime/cgo/gcc_libinit.c` since
dc2ae2886fbcd2297d2a0ea67a5d220ae2c74152 which fixed an identical issue.
Change-Id: I8c805962b88af480839f8662a1fcf4ed1e5d574d
GitHub-Last-Rev: b99fbda4f6fe7a199a59af425e997111137262a4
GitHub-Pull-Request: golang/go#77847
Files:
- M src/runtime/cgo/gcc_clearenv.c
Change size: XS
Delta: 1 file changed, 1 insertion(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Ian Lance Taylor, +1 by David Chase, +2 by Cherry Mui
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI