diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-04 03:59:07 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-04 03:59:07 +0000 |
commit | 9f538c0458a40ff03fab4dd6c72f8e1e0960f80a (patch) | |
tree | 60b3073a95a15882bbb6976459f6ff84089dc270 /doio.c | |
parent | bb4eb8ef33fdf31b7c6163f2bc75bf012292f041 (diff) | |
download | perl-9f538c0458a40ff03fab4dd6c72f8e1e0960f80a.tar.gz |
avoid warnings from shmread() when given undefined variable
(from Tom Christiansen)
p4raw-id: //depot/perl@5504
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1849,6 +1849,9 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp) if (shm == (char *)-1) /* I hate System V IPC, I really do */ return -1; if (optype == OP_SHMREAD) { + /* suppress warning when reading into undef var (tchrist 3/Mar/00) */ + if (! SvOK(mstr)) + sv_setpvn(mstr, "", 0); SvPV_force(mstr, len); mbuf = SvGROW(mstr, msize+1); |