diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-28 13:10:48 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-28 13:10:48 +0000 |
commit | 0a0ffbced76eaafcaebd51ddc09366bc6ba04e9e (patch) | |
tree | ce5bcf24c3bb0ff610008329cd1db826dd0a7265 /pp.c | |
parent | c6502f5c7c927d82523e421275ac87013ce318d5 (diff) | |
download | perl-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; } |