]> granicus.if.org Git - python/commitdiff
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH...
authorAnonymous Maarten <madebr@users.noreply.github.com>
Wed, 28 Aug 2019 17:11:03 +0000 (19:11 +0200)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 28 Aug 2019 17:11:03 +0000 (10:11 -0700)
https://bugs.python.org/issue37965

https://bugs.python.org/issue37965

Automerge-Triggered-By: @benjaminp
Lib/distutils/ccompiler.py
Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst [new file with mode: 0644]

index 1a411ed1113224cb0ae52233377155dbd2784378..4cfc6c7065e922dde36aabbe46aa38b9723b1180 100644 (file)
@@ -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:
diff --git a/Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst b/Misc/NEWS.d/next/Library/2019-08-28-14-04-18.bpo-37965.7xGE-C.rst
new file mode 100644 (file)
index 0000000..116a9e4
--- /dev/null
@@ -0,0 +1 @@
+Fix C compiler warning caused by distutils.ccompiler.CCompiler.has_function.