[Python-checkins] Fix a couple of compiler warnings. (GH-28677)
markshannon
webhook-mailer at python.org
Fri Oct 1 10:44:27 EDT 2021
https://github.com/python/cpython/commit/cd760ceb67c5164983838ed7eb73a833d1597da0
commit: cd760ceb67c5164983838ed7eb73a833d1597da0
branch: main
author: Mark Shannon <mark at hotpy.org>
committer: markshannon <mark at hotpy.org>
date: 2021-10-01T15:44:19+01:00
summary:
Fix a couple of compiler warnings. (GH-28677)
files:
M Python/ceval.c
diff --git a/Python/ceval.c b/Python/ceval.c
index ab692fd8ded15..7f29967eb3272 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3666,7 +3666,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
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 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
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;
More information about the Python-checkins
mailing list