New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler warnings when building Python 3.8 #82502
Comments
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 |
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] /home/vstinner/python/master/Modules/_asynciomodule.c: In function ‘task_step_impl’: In function ‘getsockaddrarg’, For socketmodule: I already created bpo-38282. |
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 |
And more: c:\vstinner\python\master\modules\_testcapimodule.c(6409): warning C4146: unary minus operator applied to unsigned type, result still unsigned |
On my Windows, some non-ASCII characters cause this warning:
This patch fixes the warnings, it's applicable to master/3.8 branches. Maybe this trivial problem is not worth a new commit, it can be fixed along with other warnings. |
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 |
This file is copied directly from https://github.com/libexpat/libexpat/ project. Would you mind to propose your patch there? |
ok, I will report to there. |
Ok, most warnings have been fixed in 3.8 and master. I close the issue. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: