Skip to content

Commit 9d38c21

Browse files
fix warnings
1 parent 7bf8b08 commit 9d38c21

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Python/optimizer_bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,10 @@ dummy_func(void) {
559559
}
560560

561561
op(_CHECK_FUNCTION_VERSION, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {
562+
(void)self_or_null;
562563
if (sym_is_const(callable) && sym_matches_type(callable, &PyFunction_Type)) {
563564
assert(PyFunction_Check(sym_get_const(callable)));
564-
REPLACE_OP(this_instr, _CHECK_FUNCTION_VERSION_INLINE, func_version, sym_get_const(callable));
565+
REPLACE_OP(this_instr, _CHECK_FUNCTION_VERSION_INLINE, func_version, (uintptr_t)sym_get_const(callable));
565566
}
566567
sym_set_type(callable, &PyFunction_Type);
567568
}
@@ -571,7 +572,7 @@ dummy_func(void) {
571572
if (sym_is_const(callable) && sym_matches_type(callable, &PyFunction_Type)) {
572573
if (sym_is_null(self_or_null) || sym_is_not_null(self_or_null)) {
573574
PyFunctionObject *func = (PyFunctionObject *)sym_get_const(callable);
574-
PyCodeObject *co = func->func_code;
575+
PyCodeObject *co = (PyCodeObject *)func->func_code;
575576
if (co->co_argcount == oparg + !sym_is_null(self_or_null)) {
576577
// Note: this is only valid if CHECK_FUNCTION_VERSION precedes this instruction.
577578
REPLACE_OP(this_instr, _NOP, 0 ,0);

Python/optimizer_cases.c.h

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)