[Python-checkins] bpo-46405: fix msvc compiler warnings (GH-30627)

markshannon webhook-mailer at python.org
Mon Jan 17 11:30:25 EST 2022


https://github.com/python/cpython/commit/a4bc2218d270c4c7a898c8b3967c8c271afe9abe
commit: a4bc2218d270c4c7a898c8b3967c8c271afe9abe
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: markshannon <mark at hotpy.org>
date: 2022-01-17T16:30:10Z
summary:

bpo-46405: fix msvc compiler warnings (GH-30627)

files:
M Python/specialize.c

diff --git a/Python/specialize.c b/Python/specialize.c
index 2da9e0f29b7a4..7c2252dd7a0e5 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -1240,7 +1240,7 @@ _Py_Specialize_StoreSubscr(PyObject *container, PyObject *sub, _Py_CODEUNIT *ins
     if (container_type == &PyList_Type) {
         if (PyLong_CheckExact(sub)) {
             if ((Py_SIZE(sub) == 0 || Py_SIZE(sub) == 1)
-                && ((PyLongObject *)sub)->ob_digit[0] < PyList_GET_SIZE(container))
+                && ((PyLongObject *)sub)->ob_digit[0] < (size_t)PyList_GET_SIZE(container))
             {
                 *instr = _Py_MAKECODEUNIT(STORE_SUBSCR_LIST_INT,
                                           initial_counter_value());



More information about the Python-checkins mailing list