summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-09-17 19:26:01 +0000
committerNicholas Clark <nick@ccl4.org>2006-09-17 19:26:01 +0000
commit7f39519f31fe8f3aa4f113c542472c46ec6c535a (patch)
treeb0b413cca524a2399654fac621d7a5e32f7ab699 /doio.c
parentbe981c670f6cd575d33c165ebfacc6c0c96c358b (diff)
downloadperl-7f39519f31fe8f3aa4f113c542472c46ec6c535a.tar.gz
Fix one genuine unitialised code path spotted by gcc, and a signed/
unsigned warning. p4raw-id: //depot/perl@28863
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index bc301300a7..e6909cb351 100644
--- 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;
}