Skip to content

Commit

Permalink
Fold the otherwise-unused PADNAME variables into their assert() expre…
Browse files Browse the repository at this point in the history
…ssions so as not to get warnings of unused vars when not in -DDEBUGGING
  • Loading branch information
leonerd committed Feb 5, 2025
1 parent 032f025 commit d12c59d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions op.c
Original file line number Diff line number Diff line change
Expand Up @@ -16262,9 +16262,7 @@ Perl_subsignature_append_positional(pTHX_ OP *varop, OPCODE defmode, OP *defexpr
assert(varop->op_type == OP_ARGELEM);
assert((varop->op_private & OPpARGELEM_MASK) == OPpARGELEM_SV);
assert(varop->op_targ);

PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[varop->op_targ];
assert(PadnamePV(pn)[0] == '$');
assert(PadnamePV(PadnamelistARRAY(PL_comppad_name)[varop->op_targ])[0] == '$');

/* Now fill in the argix */
cUNOP_AUXx(varop)->op_aux = INT2PTR(UNOP_AUX_item *, argix);
Expand Down Expand Up @@ -16345,9 +16343,7 @@ Perl_subsignature_append_slurpy(pTHX_ I32 sigil, OP *varop)
assert((varop->op_private & OPpARGELEM_MASK) ==
((sigil == '@') ? OPpARGELEM_AV : OPpARGELEM_HV));
assert(varop->op_targ);

PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[varop->op_targ];
assert(PadnamePV(pn)[0] == sigil);
assert(PadnamePV(PadnamelistARRAY(PL_comppad_name)[varop->op_targ])[0] == sigil);

/* Now fill in the argix */
cUNOP_AUXx(varop)->op_aux = INT2PTR(UNOP_AUX_item *, argix);
Expand Down

0 comments on commit d12c59d

Please sign in to comment.