Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit 475e1ca

Browse files
authored
Merge pull request #84 from cpanel/unopaux-warnings
Avoid warnings from UNOP_AUX
2 parents 8046b70 + ca74e08 commit 475e1ca

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/B/C/OverLoad/B/UNOP_AUX.pm

+8-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ sub do_save {
2626
my ( $ix, $sym ) = unopauxsect()->reserve( $op, "OP*" );
2727
unopauxsect()->debug( $op->name, $op );
2828

29+
my $first = $op->first->save;
30+
# cast to avoid warning
31+
if ( $first eq '(void*)Nullsv' ) {
32+
$first = '(OP*) 0';
33+
}
34+
2935
unopauxsect()->supdate(
30-
$ix, "%s, %s, %s", $op->save_baseop, $op->first->save,
36+
$ix, "%s, %s, %s", $op->save_baseop, $first,
3137
'AUX-TO-BE-FILLED'
3238
);
3339

@@ -39,7 +45,7 @@ sub do_save {
3945
# IV ix = PTR2IV(cUNOP_AUXo->op_aux);
4046

4147
my $op_aux = $op->aux_ptr2iv // 0;
42-
unopauxsect()->update_field( $ix, OP_AUX_IX(), $op_aux );
48+
unopauxsect()->update_field( $ix, OP_AUX_IX(), ' (UNOP_AUX_item *) ' . $op_aux );
4349

4450
return $sym;
4551
}

0 commit comments

Comments
 (0)