summaryrefslogtreecommitdiff
path: root/warnings.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-06-20 14:40:33 +0100
committerNicholas Clark <nick@ccl4.org>2010-06-23 08:44:42 +0100
commit980a43b097489a68f8b49125b2258eb2697e313e (patch)
tree0a334c557fbfa4c8ef64281f40c5614d9b47181d /warnings.pl
parent4e92cb89227aa006b421b88be064b91da43489dc (diff)
downloadperl-980a43b097489a68f8b49125b2258eb2697e313e.tar.gz
No need to return $i from warnings::__chk, as the value is not used.
$i holds the depth of the caller frame from which the warnings bitmask is read. The value has not been used by any caller of __chk() since c3186b657097c822.
Diffstat (limited to 'warnings.pl')
-rw-r--r--warnings.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/warnings.pl b/warnings.pl
index 25dd302902..4c2c3bbff0 100644
--- a/warnings.pl
+++ b/warnings.pl
@@ -738,7 +738,7 @@ sub __chk
# Defaulting this to 0 reduces complexity in code paths below.
my $callers_bitmask = (caller($i))[9] || 0 ;
- return ($callers_bitmask, $offset, $i) ;
+ return ($callers_bitmask, $offset) ;
}
sub _error_loc {
@@ -751,7 +751,7 @@ sub enabled
Croaker("Usage: warnings::enabled([category])")
unless @_ == 1 || @_ == 0 ;
- my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+ my ($callers_bitmask, $offset) = __chk(@_) ;
return vec($callers_bitmask, $offset, 1) ||
vec($callers_bitmask, $Offsets{'all'}, 1) ;
@@ -762,7 +762,7 @@ sub fatal_enabled
Croaker("Usage: warnings::fatal_enabled([category])")
unless @_ == 1 || @_ == 0 ;
- my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+ my ($callers_bitmask, $offset) = __chk(@_) ;
return vec($callers_bitmask, $offset + 1, 1) ||
vec($callers_bitmask, $Offsets{'all'} + 1, 1) ;
@@ -774,7 +774,7 @@ sub warn
unless @_ == 2 || @_ == 1 ;
my $message = pop ;
- my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+ my ($callers_bitmask, $offset) = __chk(@_) ;
require Carp;
Carp::croak($message)
if vec($callers_bitmask, $offset+1, 1) ||
@@ -788,7 +788,7 @@ sub warnif
unless @_ == 2 || @_ == 1 ;
my $message = pop ;
- my ($callers_bitmask, $offset, $i) = __chk(@_) ;
+ my ($callers_bitmask, $offset) = __chk(@_) ;
return
unless (vec($callers_bitmask, $offset, 1) ||