mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
fix: don't trigger -Wunused-parameter in flagcheck.cpp. (#2735)
... by leaving the unused parameters anonymous. (This can be checked e.g. by compiling python_example with -Wall -Wextra.)
This commit is contained in:
parent
5bd766bf6c
commit
6b4297fd2f
@ -232,7 +232,8 @@ def has_flag(compiler, flag):
|
||||
with tmp_chdir():
|
||||
fname = "flagcheck.cpp"
|
||||
with open(fname, "w") as f:
|
||||
f.write("int main (int argc, char **argv) { return 0; }")
|
||||
# Don't trigger -Wunused-parameter.
|
||||
f.write("int main (int, char **) { return 0; }")
|
||||
|
||||
try:
|
||||
compiler.compile([fname], extra_postargs=[flag])
|
||||
|
Loading…
Reference in New Issue
Block a user