Skip to content

Commit

Permalink
bc: remove alias variables (#559)
Browse files Browse the repository at this point in the history
* bc: remove alias variables

* Found by perlcritic
* For instances of "my $val", it is already declared above exec_stmt()
* $code wasn't needed at top level scope

* Missed one escape in yyrule list
  • Loading branch information
mknos committed Apr 16, 2024
1 parent 417df6f commit b836236
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/bc
Expand Up @@ -1283,7 +1283,7 @@ my @yyrule = (
"stmt_compile : PRINT \$\$3 expr_list_commas",
"\$\$4 :",
"stmt_compile : '{' \$\$4 stmt_list_block '}'",
"\$$5 :",
"\$\$5 :",
"stmt_compile : IF '(' stmt_compile ')' \$\$5 terminator_or_void stmt_compile",
"\$\$6 :",
"\$\$7 :",
Expand Down Expand Up @@ -2282,7 +2282,6 @@ sub finish_stmt
}

my ($res, $val);
my $code;

#
# exec_stmt
Expand Down Expand Up @@ -2482,7 +2481,7 @@ sub exec_stmt
my $i_incr = shift @stmt_s;
my $i_body = shift @stmt_s;

my $val=1;
$val = 1;

# debug { "cond: ".Dumper($i_cond) };

Expand Down Expand Up @@ -2717,7 +2716,6 @@ sub exec_stmt

}

my $val;
if ($return == 3) {
@ope_stack = ();
} else {
Expand Down

0 comments on commit b836236

Please sign in to comment.