mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +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:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user