Fix for
authorRoderick Schertler <roderick@argon.org>
Tue, 11 Jul 2000 13:55:05 +0000 (09:55 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 11 Jul 2000 18:15:16 +0000 (18:15 +0000)
Subject: [ID 20000711.005] spurious uninit warning with msgrcv()
Message-Id: <200007111755.NAA05077@jones.argon.org>

p4raw-id: //depot/cfgperl@6357

doio.c

diff --git a/doio.c b/doio.c
index d253f98..d65bfb4 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1921,6 +1921,9 @@ Perl_do_msgrcv(pTHX_ SV **mark, SV **sp)
 
     id = SvIVx(*++mark);
     mstr = *++mark;
+    /* suppress warning when reading into undef var --jhi */
+    if (! SvOK(mstr))
+       sv_setpvn(mstr, "", 0);
     msize = SvIVx(*++mark);
     mtype = (long)SvIVx(*++mark);
     flags = SvIVx(*++mark);