-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Fix a compiler warning in _randommodule.c #141058
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
Conversation
The test just before the cast ensures that the cast cannot overflow.
Fix the warning on 32-bit Windows:
Modules\_randommodule.c(525,28): warning C4244: '=': conversion
from 'uint64_t' to 'Py_ssize_t', possible loss of data
|
The warning is gone from the Win32 CI: https://github.com/python/cpython/actions/runs/19110089110/job/54607554315?pr=141058 |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
The test just before the cast ensures that the cast cannot overflow.
Fix the warning on 32-bit Windows:
Modules\_randommodule.c(525,28): warning C4244: '=': conversion
from 'uint64_t' to 'Py_ssize_t', possible loss of data
(cherry picked from commit 4ac16dd)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-141063 is a backport of this pull request to the 3.14 branch. |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
The test just before the cast ensures that the cast cannot overflow.
Fix the warning on 32-bit Windows:
Modules\_randommodule.c(525,28): warning C4244: '=': conversion
from 'uint64_t' to 'Py_ssize_t', possible loss of data
(cherry picked from commit 4ac16dd)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
GH-141064 is a backport of this pull request to the 3.13 branch. |
|
Merged, thanks for the review @kumaraditya303! |
Fix a compiler warning in _randommodule.c (GH-141058) The test just before the cast ensures that the cast cannot overflow. Fix the warning on 32-bit Windows: Modules\_randommodule.c(525,28): warning C4244: '=': conversion from 'uint64_t' to 'Py_ssize_t', possible loss of data (cherry picked from commit 4ac16dd) Co-authored-by: Victor Stinner <vstinner@python.org>
Fix a compiler warning in _randommodule.c (GH-141058) The test just before the cast ensures that the cast cannot overflow. Fix the warning on 32-bit Windows: Modules\_randommodule.c(525,28): warning C4244: '=': conversion from 'uint64_t' to 'Py_ssize_t', possible loss of data (cherry picked from commit 4ac16dd) Co-authored-by: Victor Stinner <vstinner@python.org>
The test just before the cast ensures that the cast cannot overflow.
Fix the warning on 32-bit Windows: