]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a couple of compiler warnings. (GH-28677)
authorMark Shannon <mark@hotpy.org>
Fri, 1 Oct 2021 14:44:19 +0000 (15:44 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Oct 2021 14:44:19 +0000 (15:44 +0100)
Python/ceval.c

index ab692fd8ded157c91a235bff90428e8d7328d345..7f29967eb3272f117aa2bee92e4308a01c00e113 100644 (file)
@@ -3666,7 +3666,7 @@ check_eval_breaker:
             assert(PyDict_CheckExact((PyObject *)dict));
             PyObject *name = GETITEM(names, cache0->original_oparg);
             uint32_t hint = cache1->dk_version_or_hint;
-            DEOPT_IF(hint >= dict->ma_keys->dk_nentries, LOAD_ATTR);
+            DEOPT_IF(hint >= (size_t)dict->ma_keys->dk_nentries, LOAD_ATTR);
             PyDictKeyEntry *ep = DK_ENTRIES(dict->ma_keys) + hint;
             DEOPT_IF(ep->me_key != name, LOAD_ATTR);
             res = ep->me_value;
@@ -3774,7 +3774,7 @@ check_eval_breaker:
             assert(PyDict_CheckExact((PyObject *)dict));
             PyObject *name = GETITEM(names, cache0->original_oparg);
             uint32_t hint = cache1->dk_version_or_hint;
-            DEOPT_IF(hint >= dict->ma_keys->dk_nentries, STORE_ATTR);
+            DEOPT_IF(hint >= (size_t)dict->ma_keys->dk_nentries, STORE_ATTR);
             PyDictKeyEntry *ep = DK_ENTRIES(dict->ma_keys) + hint;
             DEOPT_IF(ep->me_key != name, STORE_ATTR);
             PyObject *old_value = ep->me_value;