Skip to content

Commit cbd4569

Browse files
committed
Fix some compiler warnings
1 parent ffa559b commit cbd4569

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/optimizer_symbols.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ _Py_uop_abstractcontext_fini(JitOptContext *ctx)
663663
void
664664
_Py_uop_abstractcontext_init(JitOptContext *ctx)
665665
{
666-
static_assert(sizeof(JitOptSymbol) <= 2*sizeof(uint64_t));
666+
static_assert(sizeof(JitOptSymbol) <= 2 * sizeof(uint64_t), "JitOptSymbol has grown");
667667
ctx->limit = ctx->locals_and_stack + MAX_ABSTRACT_INTERP_SIZE;
668668
ctx->n_consumed = ctx->locals_and_stack;
669669
#ifdef Py_DEBUG // Aids debugging a little. There should never be NULL in the abstract interpreter.
@@ -718,6 +718,7 @@ _Py_uop_symbols_test(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
718718
_Py_uop_abstractcontext_init(ctx);
719719
PyObject *val_42 = NULL;
720720
PyObject *val_43 = NULL;
721+
PyObject *tuple = NULL;
721722

722723
// Use a single 'sym' variable so copy-pasting tests is easier.
723724
JitOptSymbol *sym = _Py_uop_sym_new_unknown(ctx);
@@ -821,7 +822,7 @@ _Py_uop_symbols_test(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
821822
"tuple item does not match value used to create tuple"
822823
);
823824
PyObject *pair[2] = { val_42, val_43 };
824-
PyObject *tuple = _PyTuple_FromArray(pair, 2);
825+
tuple = _PyTuple_FromArray(pair, 2);
825826
sym = _Py_uop_sym_new_const(ctx, tuple);
826827
TEST_PREDICATE(
827828
_Py_uop_sym_get_const(ctx, _Py_uop_sym_tuple_getitem(ctx, sym, 1)) == val_43,

0 commit comments

Comments
 (0)