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.)
diff --git a/pybind11/setup_helpers.py b/pybind11/setup_helpers.py
index 33605dd..83e0bce 100644
--- a/pybind11/setup_helpers.py
+++ b/pybind11/setup_helpers.py
@@ -232,7 +232,8 @@
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])