Commit 6b4297fd by Antony Lee Committed by GitHub

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.)
parent 5bd766bf
...@@ -232,7 +232,8 @@ def has_flag(compiler, flag): ...@@ -232,7 +232,8 @@ def has_flag(compiler, flag):
with tmp_chdir(): with tmp_chdir():
fname = "flagcheck.cpp" fname = "flagcheck.cpp"
with open(fname, "w") as f: 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: try:
compiler.compile([fname], extra_postargs=[flag]) compiler.compile([fname], extra_postargs=[flag])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment