X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_sys.c;h=909f5f75b29148255fdbf823f80d59fd18a3f602;hb=6c86a5decffbcc9e070ab10ead129ef138d02434;hp=690bc9d381b303b1ba67cf70fe49472a119c4612;hpb=fdd78bafb83473399368c22ad797c178b3913c97;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_sys.c b/pp_sys.c index 690bc9d..909f5f7 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1270,6 +1270,7 @@ PP(pp_enterwrite) register IO *io; GV *fgv; CV *cv; + SV * tmpsv = NULL; if (MAXARG == 0) gv = PL_defoutgv; @@ -1293,8 +1294,8 @@ PP(pp_enterwrite) cv = GvFORM(fgv); if (!cv) { - SV * const tmpsv = sv_newmortal(); const char *name; + tmpsv = sv_newmortal(); gv_efullname4(tmpsv, fgv, NULL, FALSE); name = SvPV_nolen_const(tmpsv); if (name && *name) @@ -1622,7 +1623,7 @@ PP(pp_sysread) buffer = SvGROW(bufsv, (STRLEN)(length+1)); /* 'offset' means 'flags' here */ count = PerlSock_recvfrom(PerlIO_fileno(IoIFP(io)), buffer, length, offset, - (struct sockaddr *)namebuf, &bufsize); + (struct sockaddr *)namebuf, &bufsize); if (count < 0) RETPUSHUNDEF; #ifdef EPOC @@ -2785,7 +2786,7 @@ PP(pp_stat) { dVAR; dSP; - GV *gv; + GV *gv = NULL; IO *io; I32 gimme; I32 max = 13; @@ -2797,7 +2798,7 @@ PP(pp_stat) do_fstat_warning_check: if (ckWARN(WARN_IO)) Perl_warner(aTHX_ packWARN(WARN_IO), - "lstat() on filehandle %s", GvENAME(gv)); + "lstat() on filehandle %s", gv ? GvENAME(gv) : ""); } else if (PL_laststype != OP_LSTAT) Perl_croak(aTHX_ "The stat preceding lstat() wasn't an lstat"); } @@ -4650,7 +4651,7 @@ PP(pp_ghostent) STRLEN addrlen; Netdb_host_t addr = (Netdb_host_t) SvPVbyte(addrsv, addrlen); - hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype); + hent = PerlSock_gethostbyaddr((const char*)addr, (Netdb_hlen_t) addrlen, addrtype); #else DIE(aTHX_ PL_no_sock_func, "gethostbyaddr"); #endif