Skip to content

cmd/cgo: warning on generated code when using -Wall #28095

Closed
@FlorianUekermann

Description

@FlorianUekermann

using cgo with:

CC=clang
CGO_CFLAGS=-std=gnu11 -march=native -O3 -g -fPIC -Wall -pedantic -Wextra -Werror

results in the following error for me:

# runtime/cgo
gcc_libinit.c:66:38: error: unused parameter 'dummy' [-Werror,-Wunused-parameter]

This is not a major issue, but it would be nice if we didn't have to add -Wno-unused-parameter, since the warning may be desired in other C code. Looking at the code, it seems as if dummy may as well be unnamed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions