summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-08-28 10:32:34 -0700
committerBenjamin Peterson <benjamin@python.org>2019-08-28 10:32:34 -0700
commit23985c6a64222df46cd7e21b9b21c0e37aa95e10 (patch)
tree46ccf4da0bf12d17754d0ef9d557127ae12472eb /Lib
parent2cb82d2a88710b0af10b9d9721a9710ecc037e72 (diff)
downloadcpython-git-23985c6a64222df46cd7e21b9b21c0e37aa95e10.tar.gz
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15561)
https://bugs.python.org/issue37965 https://bugs.python.org/issue37965 Automerge-Triggered-By: @benjaminp (cherry picked from commit 55aabee07501e1468082b3237620e4ecd75c5da6) Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/ccompiler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index 1a411ed111..4cfc6c7065 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -781,8 +781,9 @@ class CCompiler:
for incl in includes:
f.write("""#include "%s"\n""" % incl)
f.write("""\
-main (int argc, char **argv) {
+int main (int argc, char **argv) {
%s();
+ return 0;
}
""" % funcname)
finally: