Fix one genuine unitialised code path spotted by gcc, and a signed/
Nicholas Clark [Sun, 17 Sep 2006 19:26:01 +0000 (19:26 +0000)]
unsigned warning.

p4raw-id: //depot/perl@28863

doio.c

diff --git a/doio.c b/doio.c
index bc30130..e6909cb 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1319,6 +1319,7 @@ Perl_my_stat(pTHX)
        }
         else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
             io = (IO*)SvRV(sv);
+           gv = NULL;
             goto do_fstat_have_io;
         }
 
@@ -2251,7 +2252,8 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp)
     SETERRNO(0,0);
     if (shmctl(id, IPC_STAT, &shmds) == -1)
        return -1;
-    if (mpos < 0 || msize < 0 || (size_t)mpos + msize > shmds.shm_segsz) {
+    if (mpos < 0 || msize < 0
+       || (size_t)mpos + msize > (size_t)shmds.shm_segsz) {
        SETERRNO(EFAULT,SS_ACCVIO);             /* can't do as caller requested */
        return -1;
     }