Skip to content

Commit 0229b56

Browse files
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560)
https://bugs.python.org/issue37965 https://bugs.python.org/issue37965 Automerge-Triggered-By: @benjaminp (cherry picked from commit 55aabee) Co-authored-by: Anonymous Maarten <[email protected]>
1 parent c364221 commit 0229b56

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/distutils/ccompiler.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,9 @@ def has_function(self, funcname, includes=None, include_dirs=None,
748748
for incl in includes:
749749
f.write("""#include "%s"\n""" % incl)
750750
f.write("""\
751-
main (int argc, char **argv) {
751+
int main (int argc, char **argv) {
752752
%s();
753+
return 0;
753754
}
754755
""" % funcname)
755756
finally:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix C compiler warning caused by distutils.ccompiler.CCompiler.has_function.

0 commit comments

Comments
 (0)