]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106529: Silence compiler warning in jump target patching (#106613)
authorGuido van Rossum <guido@python.org>
Tue, 11 Jul 2023 02:12:32 +0000 (19:12 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Jul 2023 02:12:32 +0000 (19:12 -0700)
(gh-106551 caused a compiler warning about on Windows.)

Python/optimizer.c

index 48c29f55bee46b371ec92ece95bdf6117b639ccc..08073193c0228f7bb27b7672e8db0792b26e8177 100644 (file)
@@ -548,8 +548,8 @@ done:
                 if (trace[i].opcode == _POP_JUMP_IF_FALSE ||
                     trace[i].opcode == _POP_JUMP_IF_TRUE)
                 {
-                    int target = trace[i].operand;
-                    if (target >= max_length) {
+                    uint64_t target = trace[i].operand;
+                    if (target >= (uint64_t)max_length) {
                         target += trace_length - max_length;
                         trace[i].operand = target;
                     }