8000 closes bpo-37965: Fix compiler warning of distutils CCompiler.test_fu… · python/cpython@55aabee · GitHub
[go: up one dir, main page]

Skip to content

Commit 55aabee

Browse files
madebrmiss-islington
authored andcommitted
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
1 parent 2a16eea commit 55aabee

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/distutils/ccompiler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,9 @@ def has_function(self, funcname, includes=None, include_dirs=None,
781781
for incl in includes:
782782
f.write("""#include "%s"\n""" % incl)
783783
f.write("""\
784-
main (int argc, char **argv) {
784+
int main (int argc, char **argv) {
785785
%s();
786+
return 0;
786787
}
787788
""" % funcname)
788789
finally:
Lines changed: 1 addition & 0 deletions
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)
0