-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
fix warnings in jit builds #144817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix warnings in jit builds #144817
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -398,7 +398,7 @@ get_test_bit_for_bools(void) { | |
| uintptr_t true_bits = (uintptr_t)&_Py_TrueStruct; | ||
| #endif | ||
| for (int i = 4; i < 8; i++) { | ||
| if ((true_bits ^ false_bits) & (1 << i)) { | ||
| if ((true_bits ^ false_bits) & (uintptr_t)(1 << i)) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and below |
||
| return i; | ||
| } | ||
| } | ||
|
|
@@ -412,8 +412,8 @@ test_bit_set_in_true(int bit) { | |
| #else | ||
| uintptr_t true_bits = (uintptr_t)&_Py_TrueStruct; | ||
| #endif | ||
| assert((true_bits ^ ((uintptr_t)&_Py_FalseStruct)) & (1 << bit)); | ||
| return true_bits & (1 << bit); | ||
| assert((true_bits ^ ((uintptr_t)&_Py_FalseStruct)) & (uintptr_t)(1 << bit)); | ||
| return true_bits & (uintptr_t)(1 << bit); | ||
| } | ||
|
|
||
| #ifdef Py_DEBUG | ||
|
|
@@ -504,7 +504,7 @@ optimize_uops( | |
| stack_pointer = ctx->frame->stack_pointer; | ||
| } | ||
|
|
||
| DUMP_UOP(ctx, "abs", this_instr - trace, this_instr, stack_pointer); | ||
| DUMP_UOP(ctx, "abs", (int)(this_instr - trace), this_instr, stack_pointer); | ||
|
|
||
| _PyUOpInstruction *out_ptr = ctx->out_buffer.next; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,11 +109,13 @@ dummy_func(void) { | |
| } | ||
|
|
||
| op(_STORE_ATTR_INSTANCE_VALUE, (offset/1, value, owner -- o)) { | ||
| (void)offset; | ||
| (void)value; | ||
| o = owner; | ||
| } | ||
|
|
||
| op(_STORE_ATTR_WITH_HINT, (hint/1, value, owner -- o)) { | ||
| (void)hint; | ||
| (void)value; | ||
| o = owner; | ||
| } | ||
|
|
@@ -320,7 +322,8 @@ dummy_func(void) { | |
| r = right; | ||
| } | ||
|
|
||
| op(_BINARY_OP_EXTEND, (left, right -- res, l, r)) { | ||
| op(_BINARY_OP_EXTEND, (descr/4, left, right -- res, l, r)) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
line was already in The |
||
| (void)descr; | ||
| res = sym_new_not_null(ctx); | ||
| l = left; | ||
| r = right; | ||
|
|
@@ -386,7 +389,7 @@ dummy_func(void) { | |
| assert(PyLong_CheckExact(sym_get_const(ctx, sub_st))); | ||
| long index = PyLong_AsLong(sym_get_const(ctx, sub_st)); | ||
| assert(index >= 0); | ||
| int tuple_length = sym_tuple_length(tuple_st); | ||
| Py_ssize_t tuple_length = sym_tuple_length(tuple_st); | ||
| if (tuple_length != -1 && index < tuple_length) { | ||
| ADD_OP(_NOP, 0, 0); | ||
| } | ||
|
|
@@ -951,7 +954,7 @@ dummy_func(void) { | |
| ctx->done = true; | ||
| break; | ||
| } | ||
| int returning_stacklevel = this_instr->operand1; | ||
| int returning_stacklevel = (int)this_instr->operand1; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and below |
||
| if (ctx->curr_frame_depth >= 2) { | ||
| PyCodeObject *expected_code = ctx->frames[ctx->curr_frame_depth - 2].code; | ||
| if (expected_code == returning_code) { | ||
|
|
@@ -979,7 +982,7 @@ dummy_func(void) { | |
| break; | ||
| } | ||
| _Py_BloomFilter_Add(dependencies, returning_code); | ||
| int returning_stacklevel = this_instr->operand1; | ||
| int returning_stacklevel = (int)this_instr->operand1; | ||
| if (frame_pop(ctx, returning_code, returning_stacklevel)) { | ||
| break; | ||
| } | ||
|
|
@@ -1001,7 +1004,7 @@ dummy_func(void) { | |
| break; | ||
| } | ||
| _Py_BloomFilter_Add(dependencies, returning_code); | ||
| int returning_stacklevel = this_instr->operand1; | ||
| int returning_stacklevel = (int)this_instr->operand1; | ||
| if (frame_pop(ctx, returning_code, returning_stacklevel)) { | ||
| break; | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.