summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-01-28 13:10:48 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-01-28 13:10:48 +0000
commit0a0ffbced76eaafcaebd51ddc09366bc6ba04e9e (patch)
treece5bcf24c3bb0ff610008329cd1db826dd0a7265 /pp.c
parentc6502f5c7c927d82523e421275ac87013ce318d5 (diff)
downloadperl-0a0ffbced76eaafcaebd51ddc09366bc6ba04e9e.tar.gz
Make lc/uc/lcfirst/ucfirst warn when passed undef.
Naive implementation. p4raw-id: //depot/perl@33088
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index c667e22ff4..2b12a8fa80 100644
--- a/pp.c
+++ b/pp.c
@@ -3528,6 +3528,8 @@ PP(pp_ucfirst)
if (SvOK(source)) {
s = (const U8*)SvPV_nomg_const(source, slen);
} else {
+ if (ckWARN(WARN_UNINITIALIZED))
+ report_uninit(source);
s = (const U8*)"";
slen = 0;
}
@@ -3652,6 +3654,8 @@ PP(pp_uc)
if (SvOK(source)) {
s = (const U8*)SvPV_nomg_const(source, len);
} else {
+ if (ckWARN(WARN_UNINITIALIZED))
+ report_uninit(source);
s = (const U8*)"";
len = 0;
}
@@ -3752,6 +3756,8 @@ PP(pp_lc)
if (SvOK(source)) {
s = (const U8*)SvPV_nomg_const(source, len);
} else {
+ if (ckWARN(WARN_UNINITIALIZED))
+ report_uninit(source);
s = (const U8*)"";
len = 0;
}