You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-10-01.11:55:21.297>created_at=<Date2019-09-30.10:08:44.841>labels= ['interpreter-core', 'build', '3.8']
title='Compiler warnings when building Python 3.8'updated_at=<Date2019-10-01.11:55:21.296>user='https://github.com/vstinner'
/home/vstinner/python/master/Modules/_randommodule.c:546:17: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
546 | {Py_tp_doc, random_doc},
| ^~~~~~~~~~
/home/vstinner/python/master/Modules/_asynciomodule.c: In function ‘task_step_impl’:
/home/vstinner/python/master/Modules/_asynciomodule.c:2660:1: warning: label ‘set_exception’ defined but not used [-Wunused-label]
2660 | set_exception:
| ^~~~~~~~~~~~~
In function ‘getsockaddrarg’,
inlined from ‘sock_bind’ at /home/vstinner/python/master/Modules/socketmodule.c:3113:10:
/home/vstinner/python/master/Modules/socketmodule.c:2331:9: warning: ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject ‘sa’ with type ‘struct sockaddr’ at offset 0 [-Warray-bounds]
2331 | memset(sa, 0, sizeof(*sa));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
On my Windows, some non-ASCII characters cause this warning:
d:\dev\cpython\modules\expat\xmltok.c : warning C4819:
The file contains a character that cannot be represented in
the current code page (936). Save the file in Unicode format
to prevent data loss.
Maybe this trivial problem is not worth a new commit, it can be fixed along with other warnings.
animalize commented on Oct 1, 2019
animalizemannequin
Mannequin
More actions
Other warnings:
c:\vstinner\python\master\objects\longobject.c(420): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data
c:\vstinner\python\master\objects\longobject.c(428): warning C4267: 'function': conversion from 'size_t' to 'sdigit', possible loss of data
-----------------
These warnings only appear in master branch, I will fix it at some point.
(https://bugs.python.org/issue35696#msg352903)
Activity
vstinner commentedon Sep 30, 2019
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winbase.h(103): warning C4005: 'Yield': macro redefinition
c:\vstinner\python\3.8\modules\_asynciomodule.c(2667): warning C4102: 'set_exception': unreferenced label
c:\vstinner\python\3.8\modules\_ctypes\stgdict.c(704): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
vstinner commentedon Sep 30, 2019
Warnings on Linux with gcc -O3:
/home/vstinner/python/master/Modules/_randommodule.c:546:17: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
546 | {Py_tp_doc, random_doc},
| ^~~~~~~~~~
/home/vstinner/python/master/Modules/_asynciomodule.c: In function ‘task_step_impl’:
/home/vstinner/python/master/Modules/_asynciomodule.c:2660:1: warning: label ‘set_exception’ defined but not used [-Wunused-label]
2660 | set_exception:
| ^~~~~~~~~~~~~
In function ‘getsockaddrarg’,
inlined from ‘sock_bind’ at /home/vstinner/python/master/Modules/socketmodule.c:3113:10:
/home/vstinner/python/master/Modules/socketmodule.c:2331:9: warning: ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject ‘sa’ with type ‘struct sockaddr’ at offset 0 [-Warray-bounds]
2331 | memset(sa, 0, sizeof(*sa));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
For socketmodule: I already created bpo-38282.
[-]Windows: compiler warnings when building Python 3.8[/-][+]Compiler warnings when building Python 3.8[/+]vstinner commentedon Sep 30, 2019
Other warnings:
c:\vstinner\python\master\objects\longobject.c(420): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data
c:\vstinner\python\master\objects\longobject.c(428): warning C4267: 'function': conversion from 'size_t' to 'sdigit', possible loss of data
vstinner commentedon Sep 30, 2019
And more:
c:\vstinner\python\master\modules\_testcapimodule.c(6409): warning C4146: unary minus operator applied to unsigned type, result still unsigned
vstinner commentedon Sep 30, 2019
New changeset efe74b6 by Victor Stinner in branch 'master':
bpo-38321: Fix _asynciomodule.c compiler warning (GH-16493)
efe74b6
vsajip commentedon Sep 30, 2019
New changeset c9a413e by Vinay Sajip (Victor Stinner) in branch 'master':
bpo-38321: Fix PyCStructUnionType_update_stgdict() warning (GH-16492)
c9a413e
vstinner commentedon Sep 30, 2019
New changeset aca8c40 by Victor Stinner in branch 'master':
bpo-38321: Fix _testcapimodule.c warning (GH-16494)
aca8c40
animalize commentedon Oct 1, 2019
On my Windows, some non-ASCII characters cause this warning:
This patch fixes the warnings, it's applicable to master/3.8 branches.
https://github.com/animalize/cpython/commit/daced7575ec70ef1f888c6854760e230cda5ea64
Maybe this trivial problem is not worth a new commit, it can be fixed along with other warnings.
animalize commentedon Oct 1, 2019
Other warnings:
c:\vstinner\python\master\objects\longobject.c(420): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data
c:\vstinner\python\master\objects\longobject.c(428): warning C4267: 'function': conversion from 'size_t' to 'sdigit', possible loss of data
-----------------
These warnings only appear in master branch, I will fix it at some point.
(https://bugs.python.org/issue35696#msg352903)
vstinner commentedon Oct 1, 2019
This file is copied directly from https://github.com/libexpat/libexpat/ project. Would you mind to propose your patch there?
animalize commentedon Oct 1, 2019
ok, I will report to there.
vstinner commentedon Oct 1, 2019
New changeset 2f90261 by Victor Stinner in branch 'master':
bpo-38321: Fix compiler warning in _randommodule.c (GH-16512)
2f90261
vstinner commentedon Oct 1, 2019
New changeset 6314abc by Victor Stinner in branch 'master':
bpo-37802: Fix a compiler warning in longobject.c (GH-16517)
6314abc
vstinner commentedon Oct 1, 2019
New changeset bfe1f74 by Victor Stinner in branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
bfe1f74
vstinner commentedon Oct 1, 2019
New changeset bfe1f74 by Victor Stinner in branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
bfe1f74
(oops, I made a typo in the bpo number in the commit title.)
vstinner commentedon Oct 1, 2019
Ok, most warnings have been fixed in 3.8 and master. I close the issue.