Skip to content

Commit

Permalink
[codingstd] GH #836 fix hard tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Sep 24, 2012
1 parent 847cb9b commit 7913e25
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions config/auto/warnings.pm
Expand Up @@ -361,11 +361,11 @@ sub runstep {
}

if (exists $self->{'warnings'}{$compiler}{override}) {
my %add = %{$self->{'warnings'}{$compiler}{override}};
foreach my $warning (keys %add) {
foreach my $file (@{$add{$warning}}) {
$per_file{$file} = exists $per_file{$file}
? [ @{$per_file{$file}}, $warning ] : [ @warnings, $warning ];
my %add = %{$self->{'warnings'}{$compiler}{override}};
foreach my $warning (keys %add) {
foreach my $file (@{$add{$warning}}) {
$per_file{$file} = exists $per_file{$file}
? [ @{$per_file{$file}}, $warning ] : [ @warnings, $warning ];
}
}
}
Expand Down
32 changes: 16 additions & 16 deletions lib/Parrot/Pmc2c/Method.pm
Expand Up @@ -87,8 +87,8 @@ sub interp_unused {

my $body = $self->body;
if ($body->{data} and $body->{data} =~ /^\s+return 1;\s+$/) {
$self->{interp_unused} = 1;
$self->{pmc_unused} = 1;
$self->{interp_unused} = 1;
$self->{pmc_unused} = 1;
}
return $self->{interp_unused};
}
Expand Down Expand Up @@ -260,20 +260,20 @@ sub decl {
# SHIM UNUSED(arg) in body
my $body = $self->body;
if ($body->{data} and $body->{data} =~ /^\s*UNUSED\((\w+)\)/m) {
my $key = $1;
if ($args =~ s/, (\w+ \*?$key)/, SHIM($1)/) {
$body->{data} =~ s/^\s*UNUSED\((\w+)\);?\n//;
}
if ($body->{data} =~ m/^\s*UNUSED\((INTERP|interp)\);?\n/) {
$self->{interp_unused} = 1;
warn "Replace UNUSED(interp) with UNUSED(INTERP) in $pmcname METHOD $meth\n"
if $1 eq 'interp' and $self->{parent_name} ne 'Null';
$body->{data} =~ s/^\s*UNUSED\((INTERP|interp)\);?\n//;
}
if ($body->{data} =~ m/^\s*UNUSED\(SELF\);?\n/) {
$self->{pmc_unused} = 1;
$body->{data} =~ s/^\s*UNUSED\(SELF\);?\n//;
}
my $key = $1;
if ($args =~ s/, (\w+ \*?$key)/, SHIM($1)/) {
$body->{data} =~ s/^\s*UNUSED\((\w+)\);?\n//;
}
if ($body->{data} =~ m/^\s*UNUSED\((INTERP|interp)\);?\n/) {
$self->{interp_unused} = 1;
warn "Replace UNUSED(interp) with UNUSED(INTERP) in $pmcname METHOD $meth\n"
if $1 eq 'interp' and $self->{parent_name} ne 'Null';
$body->{data} =~ s/^\s*UNUSED\((INTERP|interp)\);?\n//;
}
if ($body->{data} =~ m/^\s*UNUSED\(SELF\);?\n/) {
$self->{pmc_unused} = 1;
$body->{data} =~ s/^\s*UNUSED\(SELF\);?\n//;
}
}

my ( $extern, $newl, $semi );
Expand Down

0 comments on commit 7913e25

Please sign in to comment.