Safefree(AvALLOC(av));
AvALLOC(av) = ary;
#endif
+#if defined(MYMALLOC) && !defined(LEAKTEST)
resized:
+#endif
ary = AvALLOC(av) + AvMAX(av) + 1;
tmp = newmax - AvMAX(av);
if (av == PL_curstack) { /* Oops, grew stack (via av_store()?) */
Off_t
Perl_do_tell(pTHX_ GV *gv)
{
- register IO *io;
+ register IO *io = 0;
register PerlIO *fp;
if (gv && (io = GvIO(gv)) && (fp = IoIFP(io))) {
bool
Perl_do_seek(pTHX_ GV *gv, Off_t pos, int whence)
{
- register IO *io;
+ register IO *io = 0;
register PerlIO *fp;
if (gv && (io = GvIO(gv)) && (fp = IoIFP(io))) {
Off_t
Perl_do_sysseek(pTHX_ GV *gv, Off_t pos, int whence)
{
- register IO *io;
+ register IO *io = 0;
register PerlIO *fp;
if (gv && (io = GvIO(gv)) && (fp = IoIFP(io)))
Perl_croak(aTHX_ "exec? I'm not *that* kind of operating system");
#else
register char **a;
- char *tmps;
+ char *tmps = Nullch;
STRLEN n_a;
if (sp > mark) {
char dotdots[MAXPATHLEN] = { 0 };
char name[MAXPATHLEN] = { 0 };
char *cwd;
- int namelen;
+ int namelen = 0;
struct stat cst, pst, tst;
if (PerlLIO_stat(start, &cst) < 0) {
int i, j, k = 0;
HV *oldstash = PL_curstash;
struct tms t1, t2;
- clock_t realtime1, realtime2;
+ clock_t realtime1 = 0, realtime2 = 0;
U32 ototal = g_total;
U32 ostack = g_SAVE_STACK;
U32 operldb = PL_perldb;
return Nullsv;
#else
SV* sva;
- SV* sv, *dbg;
+ SV* sv;
SV* ret = newRV_noinc((SV*)newAV());
register SV* svend;
int tm = 0, tref = 0, ts = 0, ta = 0, tas = 0;
STRLEN len;
U8 *s = (U8*)SvPV(sv, len);
+ RETVAL = 0;
if (SvTRUE(check)) {
/* Must do things the slow way */
U8 *dest;
CODE:
{
int index;
- NV ret;
if(!items) {
XSRETURN_UNDEF;
}
PROTOTYPE: &@
CODE:
{
- SV *ret;
int index;
I32 markix;
GV *gv;
STRLEN len;
char *ptr = SvPV(str,len);
ST(0) = sv_newmortal();
- SvUPGRADE(ST(0),SVt_PVNV);
+ (void)SvUPGRADE(ST(0),SVt_PVNV);
sv_setpvn(ST(0),ptr,len);
if(SvNOKp(num) || !SvIOKp(num)) {
SvNVX(ST(0)) = SvNV(num);
MAGIC* mg=mg_find((SV*)stash, PERL_MAGIC_overload_table);
AMT *amtp = (mg) ? (AMT*)mg->mg_ptr: (AMT *) NULL;
AMT amt;
- STRLEN n_a;
if (mg && amtp->was_ok_am == PL_amagic_generation
&& amtp->was_ok_sub == PL_sub_generation)
GV *ngv;
DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256s' for overloaded `%s' in package `%.256s'\n",
- SvPV(GvSV(gv), n_a), cp, HvNAME(stash)) );
+ SvPV_nolen(GvSV(gv)), cp, HvNAME(stash)) );
if (!SvPOK(GvSV(gv))
|| !(ngv = gv_fetchmethod_autoload(stash, SvPVX(GvSV(gv)),
FALSE)))
Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
{
MAGIC *mg;
- CV *cv;
+ CV *cv=NULL;
CV **cvp=NULL, **ocvp=NULL;
- AMT *amtp, *oamtp;
- int fl=0, off, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
+ AMT *amtp=NULL, *oamtp=NULL;
+ int fl=0, off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
int postpr = 0, force_cpy = 0, assignshift = assign ? 1 : 0;
HV* stash;
if (!(AMGf_noleft & flags) && SvAMAGIC(left)
CATCH_SET(oldcatch);
if (postpr) {
- int ans;
+ int ans=0;
switch (method) {
case le_amg:
case sle_amg:
U32 max = 0;
I32 bits;
I32 havefinal = 0;
- U32 final;
+ U32 final = 0;
I32 from_utf = o->op_private & OPpTRANS_FROM_UTF;
I32 to_utf = o->op_private & OPpTRANS_TO_UTF;
U8* tsave = NULL;
simplify_sort(o);
firstkid = cLISTOPo->op_first->op_sibling; /* get past pushmark */
if (o->op_flags & OPf_STACKED) { /* may have been cleared */
- OP *k;
+ OP *k = NULL;
OP *kid = cUNOPx(firstkid)->op_first; /* get past null */
if (kid->op_type == OP_SCOPE || kid->op_type == OP_LEAVE) {
{
dSP; dATARGET; tryAMAGICbin(modulo,opASSIGN);
{
- UV left;
- UV right;
+ UV left = 0;
+ UV right = 0;
bool left_neg;
bool right_neg;
bool use_double = 0;
- NV dright;
- NV dleft;
+ NV dright = 0.0;
+ NV dleft = 0.0;
if (SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)) {
IV i = SvIVX(POPs);
/* Unless the left argument is integer in range we are going to have to
use NV maths. Hence only attempt to coerce the right argument if
we know the left is integer. */
- register UV auv;
- bool auvok;
+ register UV auv = 0;
+ bool auvok = FALSE;
bool a_valid = 0;
if (!useleft) {
{
dSP; dTARGET;
SV *sv;
- I32 len;
+ I32 len = 0;
STRLEN curlen;
STRLEN utf8_curlen;
I32 pos;
register char *patend = pat + llen;
I32 datumtype;
register I32 len;
- register I32 bits;
+ register I32 bits = 0;
register char *str;
/* These must not be in registers: */
float afloat;
double adouble;
I32 checksum = 0;
- register U32 culong;
- NV cdouble;
+ register U32 culong = 0;
+ NV cdouble = 0.0;
int commas = 0;
int star;
#ifdef PERL_NATINT_PACK
register char *s;
register char *send;
register I32 arg;
- register SV *sv;
- char *item;
- I32 itemsize;
- I32 fieldsize;
+ register SV *sv = Nullsv;
+ char *item = Nullch;
+ I32 itemsize = 0;
+ I32 fieldsize = 0;
I32 lines = 0;
bool chopspace = (strchr(PL_chopset, ' ') != Nullch);
- char *chophere;
- char *linemark;
+ char *chophere = Nullch;
+ char *linemark = Nullch;
NV value;
- bool gotsome;
+ bool gotsome = FALSE;
STRLEN len;
STRLEN fudge = SvCUR(tmpForm) * (IN_BYTE ? 1 : 3) + 1;
bool item_is_utf = FALSE;
register I32 max;
HV *stash;
GV *gv;
- CV *cv;
+ CV *cv = 0;
I32 gimme = GIMME;
OP* nextop = PL_op->op_next;
I32 overloading = 0;
SV *sv;
char *name;
STRLEN len;
- char *tryname;
+ char *tryname = Nullch;
SV *namesv = Nullsv;
SV** svp;
I32 gimme = GIMME_V;
STRLEN len;
register char *s = SvPV_force(sv, len);
register char *send = s + len;
- register char *base;
+ register char *base = Nullch;
register I32 skipspaces = 0;
- bool noblank;
- bool repeat;
+ bool noblank = FALSE;
+ bool repeat = FALSE;
bool postspace = FALSE;
U16 *fops;
register U16 *fpc;
- U16 *linepc;
+ U16 *linepc = 0;
register I32 arg;
bool ischop;
/* Unless the left argument is integer in range we are going to have to
use NV maths. Hence only attempt to coerce the right argument if
we know the left is integer. */
- register UV auv;
- bool auvok;
+ register UV auv = 0;
+ bool auvok = FALSE;
bool a_valid = 0;
if (!useleft) {
U32 defer = PL_op->op_private & OPpLVAL_DEFER;
SV *sv;
U32 hash = (SvFAKE(keysv) && SvREADONLY(keysv)) ? SvUVX(keysv) : 0;
- I32 preeminent;
+ I32 preeminent = 0;
if (SvTYPE(hv) == SVt_PVHV) {
if (PL_op->op_private & OPpLVAL_INTRO)
HV* stash;
char* name;
STRLEN namelen;
- char* packname;
+ char* packname = 0;
STRLEN packlen;
name = SvPV(meth, namelen);
flags &= ~SCF_DO_STCLASS;
}
else if (strchr((char*)PL_varies,OP(scan))) {
- I32 mincount, maxcount, minnext, deltanext, fl;
+ I32 mincount, maxcount, minnext, deltanext, fl = 0;
I32 f = flags, pos_before = 0;
regnode *oscan = scan;
struct regnode_charclass_class this_class;
}
}
else if (strchr((char*)PL_simple,OP(scan))) {
- int value;
+ int value = 0;
if (flags & SCF_DO_SUBSTR) {
scan_commit(pRExC_state,data);
if ((!r->anchored_substr || r->anchored_offset) && stclass_flag
&& !(data.start_class->flags & ANYOF_EOS)
&& !cl_is_anything(data.start_class)) {
- SV *sv;
I32 n = add_data(pRExC_state, 1, "f");
New(1006, RExC_rx->data->data[n], 1,
r->regstclass = (regnode*)RExC_rx->data->data[n];
r->reganch &= ~ROPT_SKIP; /* Used in find_byclass(). */
PL_regdata = r->data; /* for regprop() */
- DEBUG_r((sv = sv_newmortal(),
- regprop(sv, (regnode*)data.start_class),
- PerlIO_printf(Perl_debug_log, "synthetic stclass `%s'.\n",
- SvPVX(sv))));
+ DEBUG_r({ SV *sv = sv_newmortal();
+ regprop(sv, (regnode*)data.start_class);
+ PerlIO_printf(Perl_debug_log,
+ "synthetic stclass `%s'.\n",
+ SvPVX(sv));});
}
/* A temporary algorithm prefers floated substr to fixed one to dig more info. */
r->check_substr = r->anchored_substr = r->float_substr = Nullsv;
if (!(data.start_class->flags & ANYOF_EOS)
&& !cl_is_anything(data.start_class)) {
- SV *sv;
I32 n = add_data(pRExC_state, 1, "f");
New(1006, RExC_rx->data->data[n], 1,
struct regnode_charclass_class);
r->regstclass = (regnode*)RExC_rx->data->data[n];
r->reganch &= ~ROPT_SKIP; /* Used in find_byclass(). */
- DEBUG_r((sv = sv_newmortal(),
- regprop(sv, (regnode*)data.start_class),
- PerlIO_printf(Perl_debug_log, "synthetic stclass `%s'.\n",
- SvPVX(sv))));
+ DEBUG_r({ SV* sv = sv_newmortal();
+ regprop(sv, (regnode*)data.start_class);
+ PerlIO_printf(Perl_debug_log,
+ "synthetic stclass `%s'.\n",
+ SvPVX(sv));});
}
}
register regnode *ret;
STRLEN numlen;
IV namedclass;
- char *rangebegin;
+ char *rangebegin = 0;
bool need_class = 0;
- SV *listsv;
+ SV *listsv = Nullsv;
register char *e;
UV n;
bool optimize_invert = TRUE;
else {
/* len is STRLEN which is unsigned, need to copy to signed */
IV iv = len;
- assert(iv >= 0);
+ if (iv < 0)
+ Perl_croak(aTHX_ "panic: sv_setpvn called with negative strlen");
}
(void)SvUPGRADE(sv, SVt_PV);
register STDCHAR rslast;
register STDCHAR *bp;
register I32 cnt;
- I32 i;
+ I32 i = 0;
SV_CHECK_THINKFIRST(sv);
(void)SvUPGRADE(sv, SVt_PV);
STRLEN origlen;
I32 svix = 0;
static char nullstr[] = "(null)";
- SV *argsv;
+ SV *argsv = Nullsv;
/* no matter what, this is a string now */
(void)SvPV_force(sv, origlen);
STRLEN veclen = 0;
char c;
int i;
- unsigned base;
+ unsigned base = 0;
IV iv;
UV uv;
NV nv;
STATIC void
S_tokereport(pTHX_ char *thing, char* s, I32 rv)
{
- SV *report;
DEBUG_T({
- report = newSVpv(thing, 0);
+ SV* report = newSVpv(thing, 0);
Perl_sv_catpvf(aTHX_ report, ":line %d:%"IVdf":", CopLINE(PL_curcop),
(IV)rv);
for (;;) {
STRLEN prevlen;
SSize_t oldprevlen, oldoldprevlen;
- SSize_t oldloplen, oldunilen;
+ SSize_t oldloplen = 0, oldunilen = 0;
while (s < PL_bufend && isSPACE(*s)) {
if (*s++ == '\n' && PL_in_eval && !PL_rsfp)
incline(s);
really_sub:
{
char tmpbuf[sizeof PL_tokenbuf];
- SSize_t tboffset;
+ SSize_t tboffset = 0;
expectation attrful;
bool have_name, have_proto;
int key = tmp;
*/
if (!floatit) {
- IV iv;
- UV uv;
+ IV iv = 0;
+ UV uv = 0;
errno = 0;
if (*PL_tokenbuf == '-')
iv = Strtol(PL_tokenbuf, (char**)NULL, 10);
UV
Perl_utf8n_to_uvuni(pTHX_ U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
{
- UV uv = *s, ouv;
+ UV uv = *s, ouv = 0;
STRLEN len = 1;
bool dowarn = ckWARN_d(WARN_UTF8);
STRLEN expectlen = 0;