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

This commit is contained in:
Kumar Aditya 2022-01-17 22:00:10 +05:30 committed by GitHub
parent 83d544b929
commit a4bc2218d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());