summaryrefslogtreecommitdiff
path: root/lib/warnings.pm
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 /lib/warnings.pm
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 'lib/warnings.pm')
-rw-r--r--lib/warnings.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm
index ef91ff672f..837718c47e 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -453,7 +453,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 {
@@ -466,7 +466,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) ;
@@ -477,7 +477,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) ;
@@ -489,7 +489,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) ||
@@ -503,7 +503,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) ||