From: Gurusamy Sarathy Date: Sun, 5 Mar 2000 09:04:52 +0000 (+0000) Subject: fixes for most warnings identified by gcc -Wall X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=155aba94f677ac771761a1f510964fe5b21524ed;p=p5sagit%2Fp5-mst-13.2.git fixes for most warnings identified by gcc -Wall p4raw-id: //depot/perl@5540 --- diff --git a/av.c b/av.c index 1253c12..819887e 100644 --- a/av.c +++ b/av.c @@ -60,7 +60,7 @@ Perl_av_extend(pTHX_ AV *av, I32 key) { dTHR; /* only necessary if we have to extend stack */ MAGIC *mg; - if (mg = SvTIED_mg((SV*)av, 'P')) { + if ((mg = SvTIED_mg((SV*)av, 'P'))) { dSP; ENTER; SAVETMPS; @@ -241,8 +241,6 @@ SV** Perl_av_store(pTHX_ register AV *av, I32 key, SV *val) { SV** ary; - U32 fill; - if (!av) return 0; @@ -419,7 +417,7 @@ Perl_av_clear(pTHX_ register AV *av) ary[key] = &PL_sv_undef; } } - if (key = AvARRAY(av) - AvALLOC(av)) { + if ((key = AvARRAY(av) - AvALLOC(av))) { AvMAX(av) += key; SvPVX(av) = (char*)AvALLOC(av); } @@ -481,7 +479,7 @@ Perl_av_push(pTHX_ register AV *av, SV *val) if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); - if (mg = SvTIED_mg((SV*)av, 'P')) { + if ((mg = SvTIED_mg((SV*)av, 'P'))) { dSP; PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); @@ -517,7 +515,7 @@ Perl_av_pop(pTHX_ register AV *av) return &PL_sv_undef; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); - if (mg = SvTIED_mg((SV*)av, 'P')) { + if ((mg = SvTIED_mg((SV*)av, 'P'))) { dSP; PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); @@ -562,7 +560,7 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num) if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); - if (mg = SvTIED_mg((SV*)av, 'P')) { + if ((mg = SvTIED_mg((SV*)av, 'P'))) { dSP; PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); @@ -621,7 +619,7 @@ Perl_av_shift(pTHX_ register AV *av) return &PL_sv_undef; if (SvREADONLY(av)) Perl_croak(aTHX_ PL_no_modify); - if (mg = SvTIED_mg((SV*)av, 'P')) { + if ((mg = SvTIED_mg((SV*)av, 'P'))) { dSP; PUSHSTACKi(PERLSI_MAGIC); PUSHMARK(SP); @@ -671,7 +669,7 @@ Perl_av_fill(pTHX_ register AV *av, I32 fill) Perl_croak(aTHX_ "panic: null array"); if (fill < 0) fill = -1; - if (mg = SvTIED_mg((SV*)av, 'P')) { + if ((mg = SvTIED_mg((SV*)av, 'P'))) { dSP; ENTER; SAVETMPS; diff --git a/cop.h b/cop.h index cfa6f48..2f1f676 100644 --- a/cop.h +++ b/cop.h @@ -199,12 +199,12 @@ struct block_loop { : &GvSV((GV*)(c)->blk_loop.iterdata)) \ : (SV**)NULL) # define CX_ITERDATA_SET(cx,idata) \ - if (cx->blk_loop.iterdata = (idata)) \ + if ((cx->blk_loop.iterdata = (idata))) \ cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); #else # define CxITERVAR(c) ((c)->blk_loop.itervar) # define CX_ITERDATA_SET(cx,ivar) \ - if (cx->blk_loop.itervar = (SV**)(ivar)) \ + if ((cx->blk_loop.itervar = (SV**)(ivar))) \ cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); #endif diff --git a/deb.c b/deb.c index 0928c01..441487f 100644 --- a/deb.c +++ b/deb.c @@ -46,7 +46,6 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) { #ifdef DEBUGGING dTHR; - register I32 i; char* file = CopFILE(PL_curcop); #ifdef USE_THREADS diff --git a/doop.c b/doop.c index 4f536f0..e92a7ca 100644 --- a/doop.c +++ b/doop.c @@ -924,7 +924,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv) HE* entry; (void)hv_iterinit(hv); /*SUPPRESS 560*/ - while (entry = hv_iternext(hv)) + while ((entry = hv_iternext(hv))) do_chop(astr,hv_iterval(hv,entry)); return; } @@ -994,7 +994,7 @@ Perl_do_chomp(pTHX_ register SV *sv) HE* entry; (void)hv_iterinit(hv); /*SUPPRESS 560*/ - while (entry = hv_iternext(hv)) + while ((entry = hv_iternext(hv))) count += do_chomp(hv_iterval(hv,entry)); return count; } @@ -1290,7 +1290,7 @@ Perl_do_kv(pTHX) EXTEND(SP, HvKEYS(keys) * (dokeys + dovalues)); PUTBACK; /* hv_iternext and hv_iterval might clobber stack_sp */ - while (entry = hv_iternext(keys)) { + while ((entry = hv_iternext(keys))) { SPAGAIN; if (dokeys) XPUSHs(hv_iterkeysv(entry)); /* won't clobber stack_sp */ diff --git a/dump.c b/dump.c index 189d672..92a26e8 100644 --- a/dump.c +++ b/dump.c @@ -370,7 +370,6 @@ void Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o) { dTHR; - STRLEN n_a; Perl_dump_indent(aTHX_ level, file, "{\n"); level++; if (o->op_seq) @@ -524,6 +523,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o) #else if (cSVOPo->op_sv) { SV *tmpsv = NEWSV(0,0); + STRLEN n_a; ENTER; SAVEFREESV(tmpsv); gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch); @@ -1032,7 +1032,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo for (i = max; i > 0; i--) { /* Precision: count down. */ sum += freq[i] * i * i; } - while (keys = keys >> 1) + while ((keys = keys >> 1)) pow2 = pow2 << 1; /* Approximate by Poisson distribution */ theoret = HvKEYS(sv); diff --git a/embed.h b/embed.h index e6bafff..0906d87 100644 --- a/embed.h +++ b/embed.h @@ -1094,8 +1094,10 @@ #define ao S_ao #define depcom S_depcom #define incl_perldb S_incl_perldb +#if 0 #define utf16_textfilter S_utf16_textfilter #define utf16rev_textfilter S_utf16rev_textfilter +#endif # if defined(CRIPPLED_CC) #define uni S_uni # endif @@ -2521,8 +2523,10 @@ #define ao(a) S_ao(aTHX_ a) #define depcom() S_depcom(aTHX) #define incl_perldb() S_incl_perldb(aTHX) +#if 0 #define utf16_textfilter(a,b,c) S_utf16_textfilter(aTHX_ a,b,c) #define utf16rev_textfilter(a,b,c) S_utf16rev_textfilter(aTHX_ a,b,c) +#endif # if defined(CRIPPLED_CC) #define uni(a,b) S_uni(aTHX_ a,b) # endif @@ -4904,10 +4908,12 @@ #define depcom S_depcom #define S_incl_perldb CPerlObj::S_incl_perldb #define incl_perldb S_incl_perldb +#if 0 #define S_utf16_textfilter CPerlObj::S_utf16_textfilter #define utf16_textfilter S_utf16_textfilter #define S_utf16rev_textfilter CPerlObj::S_utf16rev_textfilter #define utf16rev_textfilter S_utf16rev_textfilter +#endif # if defined(CRIPPLED_CC) #define S_uni CPerlObj::S_uni #define uni S_uni diff --git a/embed.pl b/embed.pl index 0c568e3..56b121d 100755 --- a/embed.pl +++ b/embed.pl @@ -2453,8 +2453,10 @@ s |SV* |new_constant |char *s|STRLEN len|const char *key|SV *sv \ s |int |ao |int toketype s |void |depcom s |char* |incl_perldb +#if 0 s |I32 |utf16_textfilter|int idx|SV *sv|int maxlen s |I32 |utf16rev_textfilter|int idx|SV *sv|int maxlen +#endif # if defined(CRIPPLED_CC) s |int |uni |I32 f|char *s # endif diff --git a/gv.c b/gv.c index 5c50a1c..587d3dc 100644 --- a/gv.c +++ b/gv.c @@ -199,7 +199,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) topgv = *gvp; if (SvTYPE(topgv) != SVt_PVGV) gv_init(topgv, stash, name, len, TRUE); - if (cv = GvCV(topgv)) { + if ((cv = GvCV(topgv))) { /* If genuine method or valid cache entry, use it */ if (!GvCVGEN(topgv) || GvCVGEN(topgv) == PL_sub_generation) return topgv; @@ -265,9 +265,10 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) if (level == 0 || level == -1) { HV* lastchance; - if (lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE)) { - if (gv = gv_fetchmeth(lastchance, name, len, - (level >= 0) ? level + 1 : level - 1)) { + if ((lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE))) { + if ((gv = gv_fetchmeth(lastchance, name, len, + (level >= 0) ? level + 1 : level - 1))) + { gotcha: /* * Cache method in topgv if: @@ -279,7 +280,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) (cv = GvCV(gv)) && (CvROOT(cv) || CvXSUB(cv))) { - if (cv = GvCV(topgv)) + if ((cv = GvCV(topgv))) SvREFCNT_dec(cv); GvCV(topgv) = (CV*)SvREFCNT_inc(GvCV(gv)); GvCVGEN(topgv) = PL_sub_generation; @@ -621,9 +622,9 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) { stash = 0; } - else if (sv_type == SVt_PV && !GvIMPORTED_SV(*gvp) || - sv_type == SVt_PVAV && !GvIMPORTED_AV(*gvp) || - sv_type == SVt_PVHV && !GvIMPORTED_HV(*gvp) ) + else if ((sv_type == SVt_PV && !GvIMPORTED_SV(*gvp)) || + (sv_type == SVt_PVAV && !GvIMPORTED_AV(*gvp)) || + (sv_type == SVt_PVHV && !GvIMPORTED_HV(*gvp)) ) { Perl_warn(aTHX_ "Variable \"%c%s\" is not imported", sv_type == SVt_PVAV ? '@' : @@ -910,7 +911,7 @@ Perl_gv_fullname3(pTHX_ SV *sv, GV *gv, const char *prefix) { HV *hv = GvSTASH(gv); if (!hv) { - SvOK_off(sv); + (void)SvOK_off(sv); return; } sv_setpv(sv, prefix ? prefix : ""); @@ -1043,7 +1044,6 @@ Perl_gp_free(pTHX_ GV *gv) { dTHR; GP* gp; - CV* cv; if (!gv || !(gp = GvGP(gv))) return; @@ -1103,15 +1103,17 @@ register GV *gv; bool Perl_Gv_AMupdate(pTHX_ HV *stash) { - dTHR; - GV** gvp; - HV* hv; + dTHR; GV* gv; CV* cv; MAGIC* mg=mg_find((SV*)stash,'c'); AMT *amtp = (mg) ? (AMT*)mg->mg_ptr: (AMT *) NULL; AMT amt; STRLEN n_a; +#ifdef OVERLOAD_VIA_HASH + GV** gvp; + HV* hv; +#endif if (mg && amtp->was_ok_am == PL_amagic_generation && amtp->was_ok_sub == PL_sub_generation) @@ -1192,18 +1194,21 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) int i; const char *cp; SV* sv = NULL; - SV** svp; /* Work with "fallback" key, which we assume to be first in PL_AMG_names */ - if ( cp = PL_AMG_names[0] ) { + if ((cp = PL_AMG_names[0])) { /* Try to find via inheritance. */ gv = gv_fetchmeth(stash, "()", 2, -1); /* A cookie: "()". */ - if (gv) sv = GvSV(gv); - - if (!gv) goto no_table; - else if (SvTRUE(sv)) amt.fallback=AMGfallYES; - else if (SvOK(sv)) amt.fallback=AMGfallNEVER; + if (gv) + sv = GvSV(gv); + + if (!gv) + goto no_table; + else if (SvTRUE(sv)) + amt.fallback=AMGfallYES; + else if (SvOK(sv)) + amt.fallback=AMGfallNEVER; } for (i = 1; i < NofAMmeth; i++) { @@ -1359,7 +1364,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) } break; case neg_amg: - if (cv = cvp[off=subtr_amg]) { + if ((cv = cvp[off=subtr_amg])) { right = left; left = sv_2mortal(newSViv(0)); lr = 1; @@ -1527,7 +1532,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) PUSHs((SV*)cv); PUTBACK; - if (PL_op = Perl_pp_entersub(aTHX)) + if ((PL_op = Perl_pp_entersub(aTHX))) CALLRUNOPS(aTHX); LEAVE; SPAGAIN; diff --git a/hv.c b/hv.c index fd2c2d7..44d37e3 100644 --- a/hv.c +++ b/hv.c @@ -1044,7 +1044,7 @@ Perl_newHVhv(pTHX_ HV *ohv) /* Slow way */ hv_iterinit(ohv); - while (entry = hv_iternext(ohv)) { + while ((entry = hv_iternext(ohv))) { hv_store(hv, HeKEY(entry), HeKLEN(entry), SvREFCNT_inc(HeVAL(entry)), HeHASH(entry)); } @@ -1238,7 +1238,7 @@ Perl_hv_iternext(pTHX_ HV *hv) xhv = (XPVHV*)SvANY(hv); oldentry = entry = xhv->xhv_eiter; - if (mg = SvTIED_mg((SV*)hv, 'P')) { + if ((mg = SvTIED_mg((SV*)hv, 'P'))) { SV *key = sv_newmortal(); if (entry) { sv_setsv(key, HeSVKEY_force(entry)); diff --git a/mg.c b/mg.c index 904381a..96d268b 100644 --- a/mg.c +++ b/mg.c @@ -339,10 +339,7 @@ U32 Perl_magic_regdata_cnt(pTHX_ SV *sv, MAGIC *mg) { dTHR; - register char *s; - register I32 i; register REGEXP *rx; - char *t; if (PL_curpm && (rx = PL_curpm->op_pmregexp)) { if (mg->mg_obj) /* @+ */ @@ -387,10 +384,8 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg) { dTHR; register I32 paren; - register char *s; register I32 i; register REGEXP *rx; - char *t; switch (*mg->mg_ptr) { case '1': case '2': case '3': case '4': @@ -458,7 +453,6 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) register char *s; register I32 i; register REGEXP *rx; - char *t; switch (*mg->mg_ptr) { case '\001': /* ^A */ @@ -553,7 +547,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) { dTHR; if (PL_lex_state != LEX_NOTPARSING) - SvOK_off(sv); + (void)SvOK_off(sv); else if (PL_in_eval) sv_setiv(sv, 1); else @@ -756,7 +750,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) Perl_sv_catpvf(aTHX_ sv, " %"Gid_t_f, gary[i]); } #endif - SvIOK_on(sv); /* what a wonderful hack! */ + (void)SvIOK_on(sv); /* what a wonderful hack! */ break; case '*': break; @@ -879,7 +873,7 @@ Perl_magic_set_all_env(pTHX_ SV *sv, MAGIC *mg) STRLEN n_a; magic_clear_all_env(sv,mg); hv_iterinit((HV*)sv); - while (entry = hv_iternext((HV*)sv)) { + while ((entry = hv_iternext((HV*)sv))) { I32 keylen; my_setenv(hv_iterkey(entry, &keylen), SvPV(hv_iterval((HV*)sv, entry), n_a)); @@ -1085,7 +1079,7 @@ Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg) i = HvKEYS(hv); else { /*SUPPRESS 560*/ - while (entry = hv_iternext(hv)) { + while ((entry = hv_iternext(hv))) { i++; } } @@ -1420,7 +1414,7 @@ Perl_magic_gettaint(pTHX_ SV *sv, MAGIC *mg) { dTHR; TAINT_IF((mg->mg_len & 1) || - (mg->mg_len & 2) && mg->mg_obj == sv); /* kludge */ + ((mg->mg_len & 2) && mg->mg_obj == sv)); /* kludge */ return 0; } @@ -1447,7 +1441,7 @@ Perl_magic_getvec(pTHX_ SV *sv, MAGIC *mg) SV *lsv = LvTARG(sv); if (!lsv) { - SvOK_off(sv); + (void)SvOK_off(sv); return 0; } @@ -1570,7 +1564,7 @@ Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg) Perl_croak(aTHX_ "panic: magic_killbackrefs"); /* XXX Should we check that it hasn't changed? */ SvRV(svp[i]) = 0; - SvOK_off(svp[i]); + (void)SvOK_off(svp[i]); SvWEAKREF_off(svp[i]); svp[i] = &PL_sv_undef; } @@ -2090,7 +2084,7 @@ Perl_sighandler(int sig) CV *cv = Nullcv; OP *myop = PL_op; U32 flags = 0; - I32 o_save_i = PL_savestack_ix, type; + I32 o_save_i = PL_savestack_ix; XPV *tXpv = PL_Xpv; if (PL_savestack_ix + 15 <= PL_savestack_max) diff --git a/miniperlmain.c b/miniperlmain.c index fb5cf1a..9bbdaf4 100644 --- a/miniperlmain.c +++ b/miniperlmain.c @@ -13,7 +13,6 @@ static void xs_init (pTHX); static PerlInterpreter *my_perl; -static struct perl_thread *thr; /* XXXXXX testing */ #if defined (__MINT__) || defined (atarist) /* The Atari operating system doesn't have a dynamic stack. The diff --git a/objXSUB.h b/objXSUB.h index bbe9f7d..bc17e87 100644 --- a/objXSUB.h +++ b/objXSUB.h @@ -2190,6 +2190,8 @@ # endif #endif #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) +#if 0 +#endif # if defined(CRIPPLED_CC) # endif # if defined(PERL_CR_FILTER) diff --git a/op.c b/op.c index adf6aee..11ff181 100644 --- a/op.c +++ b/op.c @@ -124,11 +124,10 @@ Perl_pad_allocmy(pTHX_ char *name) PADOFFSET off; SV *sv; - if (!( - PL_in_my == KEY_our || - isALPHA(name[1]) || - (PL_hints & HINT_UTF8 && (name[1] & 0xc0) == 0xc0) || - name[1] == '_' && (int)strlen(name) > 2 )) + if (!(PL_in_my == KEY_our || + isALPHA(name[1]) || + (PL_hints & HINT_UTF8 && (name[1] & 0xc0) == 0xc0) || + (name[1] == '_' && (int)strlen(name) > 2))) { if (!isPRINT(name[1]) || strchr("\t\n\r\f", name[1])) { /* 1999-02-27 mjd@plover.com */ @@ -976,7 +975,7 @@ Perl_scalar(pTHX_ OP *o) case OP_LEAVETRY: kid = cLISTOPo->op_first; scalar(kid); - while (kid = kid->op_sibling) { + while ((kid = kid->op_sibling)) { if (kid->op_sibling) scalarvoid(kid); else @@ -1269,7 +1268,7 @@ Perl_list(pTHX_ OP *o) case OP_LEAVETRY: kid = cLISTOPo->op_first; list(kid); - while (kid = kid->op_sibling) { + while ((kid = kid->op_sibling)) { if (kid->op_sibling) scalarvoid(kid); else @@ -1339,7 +1338,6 @@ Perl_mod(pTHX_ OP *o, I32 type) { dTHR; OP *kid; - SV *sv; STRLEN n_a; if (!o || PL_error_count) @@ -2355,8 +2353,11 @@ Perl_append_elem(pTHX_ I32 type, OP *first, OP *last) if (!last) return first; - if (first->op_type != type || type==OP_LIST && first->op_flags & OPf_PARENS) - return newLISTOP(type, 0, first, last); + if (first->op_type != type + || (type == OP_LIST && (first->op_flags & OPf_PARENS))) + { + return newLISTOP(type, 0, first, last); + } if (first->op_flags & OPf_KIDS) ((LISTOP*)first)->op_last->op_sibling = last; @@ -2602,7 +2603,6 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) I32 grows = 0; I32 havefinal = 0; U32 final; - HV *hv; I32 from_utf = o->op_private & OPpTRANS_FROM_UTF; I32 to_utf = o->op_private & OPpTRANS_TO_UTF; @@ -3095,7 +3095,6 @@ void Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *id, OP *arg) { OP *pack; - OP *meth; OP *rqop; OP *imop; OP *veop; @@ -3125,7 +3124,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *id, OP *arg) /* Fake up a method call to VERSION */ meth = newSVpvn("VERSION",7); sv_upgrade(meth, SVt_PVIV); - SvIOK_on(meth); + (void)SvIOK_on(meth); PERL_HASH(SvUVX(meth), SvPVX(meth), SvCUR(meth)); veop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, @@ -3149,7 +3148,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *id, OP *arg) /* Fake up a method call to import/unimport */ meth = aver ? newSVpvn("import",6) : newSVpvn("unimport", 8);; sv_upgrade(meth, SVt_PVIV); - SvIOK_on(meth); + (void)SvIOK_on(meth); PERL_HASH(SvUVX(meth), SvPVX(meth), SvCUR(meth)); imop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, @@ -3868,7 +3867,6 @@ OP * Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *block,OP *cont) { LOOP *loop; - LOOP *tmp; OP *wop; int padoff = 0; I32 iterflags = 0; @@ -3943,9 +3941,12 @@ Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *blo append_elem(OP_LIST, expr, scalar(sv)))); assert(!loop->op_next); #ifdef PL_OP_SLAB_ALLOC - NewOp(1234,tmp,1,LOOP); - Copy(loop,tmp,1,LOOP); - loop = tmp; + { + LOOP *tmp; + NewOp(1234,tmp,1,LOOP); + Copy(loop,tmp,1,LOOP); + loop = tmp; + } #else Renew(loop, 1, LOOP); #endif @@ -4377,7 +4378,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (!name || GvCVGEN(gv)) cv = Nullcv; - else if (cv = GvCV(gv)) { + else if ((cv = GvCV(gv))) { cv_ckproto(cv, gv, ps); /* already defined (or promised)? */ if (CvROOT(cv) || CvXSUB(cv) || GvASSUMECV(gv)) { @@ -4393,7 +4394,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) Perl_croak(aTHX_ "Can't redefine active sort subroutine %s", name); if (!block) goto withattrs; - if (const_sv = cv_const_sv(cv)) + if ((const_sv = cv_const_sv(cv))) const_changed = sv_cmp(const_sv, op_const_sv(block, Nullcv)); if ((const_sv || const_changed) && ckWARN(WARN_REDEFINE)) { @@ -4561,7 +4562,6 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) GV *db_postponed = gv_fetchpv("DB::postponed", GV_ADDMULTI, SVt_PVHV); CV *pcv; HV *hv; - char *t; Perl_sv_setpvf(aTHX_ sv, "%s:%ld-%ld", CopFILE(PL_curcop), @@ -4697,7 +4697,7 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename) GV *gv = gv_fetchpv(name ? name : "__ANON__", GV_ADDMULTI, SVt_PVCV); register CV *cv; - if (cv = (name ? GvCV(gv) : Nullcv)) { + if ((cv = (name ? GvCV(gv) : Nullcv))) { if (GvCVGEN(gv)) { /* just a cached method */ SvREFCNT_dec(cv); @@ -4801,7 +4801,7 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) name = "STDOUT"; gv = gv_fetchpv(name,TRUE, SVt_PVFM); GvMULTI_on(gv); - if (cv = GvFORM(gv)) { + if ((cv = GvFORM(gv))) { if (ckWARN(WARN_REDEFINE)) { line_t oldline = CopLINE(PL_curcop); @@ -5337,7 +5337,7 @@ Perl_ck_fun(pTHX_ OP *o) tokid = &cLISTOPo->op_first; kid = cLISTOPo->op_first; if (kid->op_type == OP_PUSHMARK || - kid->op_type == OP_NULL && kid->op_targ == OP_PUSHMARK) + (kid->op_type == OP_NULL && kid->op_targ == OP_PUSHMARK)) { tokid = &kid->op_sibling; kid = kid->op_sibling; @@ -5465,7 +5465,7 @@ Perl_ck_fun(pTHX_ OP *o) SV *namesv; targ = pad_alloc(OP_RV2GV, SVs_PADTMP); namesv = PL_curpad[targ]; - SvUPGRADE(namesv, SVt_PV); + (void)SvUPGRADE(namesv, SVt_PV); if (*name != '$') sv_setpvn(namesv, "$", 1); sv_catpvn(namesv, name, len); @@ -5780,8 +5780,8 @@ Perl_ck_method(pTHX_ OP *o) SV* sv = kSVOP->op_sv; if (!(strchr(SvPVX(sv), ':') || strchr(SvPVX(sv), '\''))) { OP *cmop; - sv_upgrade(sv, SVt_PVIV); - SvIOK_on(sv); + (void)SvUPGRADE(sv, SVt_PVIV); + (void)SvIOK_on(sv); PERL_HASH(SvUVX(sv), SvPVX(sv), SvCUR(sv)); cmop = newSVOP(OP_METHOD_NAMED, 0, sv); kSVOP->op_sv = Nullsv; diff --git a/perl.c b/perl.c index c006a63..37f68e7 100644 --- a/perl.c +++ b/perl.c @@ -243,7 +243,7 @@ perl_construct(pTHXx) { U8 *s; PL_patchlevel = NEWSV(0,4); - SvUPGRADE(PL_patchlevel, SVt_PVNV); + (void)SvUPGRADE(PL_patchlevel, SVt_PVNV); if (PERL_REVISION > 127 || PERL_VERSION > 127 || PERL_SUBVERSION > 127) SvGROW(PL_patchlevel, UTF8_MAXLEN*3+1); s = (U8*)SvPVX(PL_patchlevel); @@ -373,7 +373,7 @@ perl_destruct(pTHXx) #ifdef DEBUGGING { char *s; - if (s = PerlEnv_getenv("PERL_DESTRUCT_LEVEL")) { + if ((s = PerlEnv_getenv("PERL_DESTRUCT_LEVEL"))) { int i = atoi(s); if (destruct_level < i) destruct_level = i; @@ -729,7 +729,7 @@ perl_destruct(pTHXx) } } /* we know that type >= SVt_PV */ - SvOOK_off(PL_mess_sv); + (void)SvOOK_off(PL_mess_sv); Safefree(SvPVX(PL_mess_sv)); Safefree(SvANY(PL_mess_sv)); Safefree(PL_mess_sv); @@ -935,7 +935,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) case 'W': case 'X': case 'w': - if (s = moreswitches(s)) + if ((s = moreswitches(s))) goto reswitch; break; @@ -1905,7 +1905,7 @@ Perl_magicname(pTHX_ char *sym, char *name, I32 namlen) { register GV *gv; - if (gv = gv_fetchpv(sym,TRUE, SVt_PV)) + if ((gv = gv_fetchpv(sym,TRUE, SVt_PV))) sv_magic(GvSV(gv), (SV*)gv, 0, name, namlen); } @@ -2414,7 +2414,6 @@ STATIC void S_open_script(pTHX_ char *scriptname, bool dosearch, SV *sv, int *fdscript) { dTHR; - register char *s; *fdscript = -1; @@ -2666,7 +2665,9 @@ S_fd_on_nosuid_fs(pTHX_ int fd) STATIC void S_validate_suid(pTHX_ char *validarg, char *scriptname, int fdscript) { +#ifdef IAMSUID int which; +#endif /* do we need to emulate setuid on scripts? */ @@ -2933,7 +2934,8 @@ S_find_beginning(pTHX) while (isDIGIT(s2[-1]) || strchr("-._", s2[-1])) s2--; if (strnEQ(s2-4,"perl",4)) /*SUPPRESS 530*/ - while (s = moreswitches(s)) ; + while ((s = moreswitches(s))) + ; } } } @@ -3073,7 +3075,6 @@ S_init_predump_symbols(pTHX) { dTHR; GV *tmpgv; - GV *othergv; IO *io; sv_setpvn(get_sv("\"", TRUE), " ", 1); @@ -3125,7 +3126,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register argc--,argv++; break; } - if (s = strchr(argv[0], '=')) { + if ((s = strchr(argv[0], '='))) { *s++ = '\0'; sv_setpv(GvSV(gv_fetchpv(argv[0]+1,TRUE, SVt_PV)),s); } @@ -3142,17 +3143,17 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register PL_formtarget = PL_bodytarget; TAINT; - if (tmpgv = gv_fetchpv("0",TRUE, SVt_PV)) { + if ((tmpgv = gv_fetchpv("0",TRUE, SVt_PV))) { sv_setpv(GvSV(tmpgv),PL_origfilename); magicname("0", "0", 1); } - if (tmpgv = gv_fetchpv("\030",TRUE, SVt_PV)) + if ((tmpgv = gv_fetchpv("\030",TRUE, SVt_PV))) #ifdef OS2 sv_setpv(GvSV(tmpgv), os2_execname()); #else sv_setpv(GvSV(tmpgv),PL_origargv[0]); #endif - if (PL_argvgv = gv_fetchpv("ARGV",TRUE, SVt_PVAV)) { + if ((PL_argvgv = gv_fetchpv("ARGV",TRUE, SVt_PVAV))) { GvMULTI_on(PL_argvgv); (void)gv_AVadd(PL_argvgv); av_clear(GvAVn(PL_argvgv)); @@ -3163,7 +3164,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register sv_utf8_upgrade(sv); } } - if (PL_envgv = gv_fetchpv("ENV",TRUE, SVt_PVHV)) { + if ((PL_envgv = gv_fetchpv("ENV",TRUE, SVt_PVHV))) { HV *hv; GvMULTI_on(PL_envgv); hv = GvHVn(PL_envgv); @@ -3199,7 +3200,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register #endif } TAINT_NOT; - if (tmpgv = gv_fetchpv("$",TRUE, SVt_PV)) + if ((tmpgv = gv_fetchpv("$",TRUE, SVt_PV))) sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid()); } diff --git a/perlapi.c b/perlapi.c index 7c19c22..1d619ef 100644 --- a/perlapi.c +++ b/perlapi.c @@ -3909,6 +3909,8 @@ Perl_ptr_table_split(pTHXo_ PTR_TBL_t *tbl) # endif #endif #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) +#if 0 +#endif # if defined(CRIPPLED_CC) # endif # if defined(PERL_CR_FILTER) diff --git a/pp.c b/pp.c index fcae1e4..4210bd6 100644 --- a/pp.c +++ b/pp.c @@ -2901,7 +2901,7 @@ PP(pp_splice) SV **tmparyval = 0; MAGIC *mg; - if (mg = SvTIED_mg((SV*)ary, 'P')) { + if ((mg = SvTIED_mg((SV*)ary, 'P'))) { *MARK-- = SvTIED_obj((SV*)ary, mg); PUSHMARK(MARK); PUTBACK; @@ -3095,7 +3095,7 @@ PP(pp_push) register SV *sv = &PL_sv_undef; MAGIC *mg; - if (mg = SvTIED_mg((SV*)ary, 'P')) { + if ((mg = SvTIED_mg((SV*)ary, 'P'))) { *MARK-- = SvTIED_obj((SV*)ary, mg); PUSHMARK(MARK); PUTBACK; @@ -3151,7 +3151,7 @@ PP(pp_unshift) register I32 i = 0; MAGIC *mg; - if (mg = SvTIED_mg((SV*)ary, 'P')) { + if ((mg = SvTIED_mg((SV*)ary, 'P'))) { *MARK-- = SvTIED_obj((SV*)ary, mg); PUSHMARK(MARK); PUTBACK; @@ -4170,7 +4170,7 @@ PP(pp_unpack) int i; for (i = 0; i < sizeof(PL_uuemap); i += 1) - PL_uudmap[PL_uuemap[i]] = i; + PL_uudmap[(U8)PL_uuemap[i]] = i; /* * Because ' ' and '`' map to the same value, * we need to decode them both the same. @@ -4187,22 +4187,22 @@ PP(pp_unpack) char hunk[4]; hunk[3] = '\0'; - len = PL_uudmap[*s++] & 077; + len = PL_uudmap[*(U8*)s++] & 077; while (len > 0) { if (s < strend && ISUUCHAR(*s)) - a = PL_uudmap[*s++] & 077; + a = PL_uudmap[*(U8*)s++] & 077; else a = 0; if (s < strend && ISUUCHAR(*s)) - b = PL_uudmap[*s++] & 077; + b = PL_uudmap[*(U8*)s++] & 077; else b = 0; if (s < strend && ISUUCHAR(*s)) - c = PL_uudmap[*s++] & 077; + c = PL_uudmap[*(U8*)s++] & 077; else c = 0; if (s < strend && ISUUCHAR(*s)) - d = PL_uudmap[*s++] & 077; + d = PL_uudmap[*(U8*)s++] & 077; else d = 0; hunk[0] = (a << 2) | (b >> 4); @@ -4442,7 +4442,7 @@ PP(pp_pack) len = 1; if (*pat == '/') { ++pat; - if (*pat != 'a' && *pat != 'A' && *pat != 'Z' || pat[1] != '*') + if ((*pat != 'a' && *pat != 'A' && *pat != 'Z') || pat[1] != '*') DIE(aTHX_ "/ must be followed by a*, A* or Z*"); lengthcode = sv_2mortal(newSViv(sv_len(items > 0 ? *MARK : &PL_sv_no))); @@ -5004,7 +5004,7 @@ PP(pp_split) av_extend(ary,0); av_clear(ary); SPAGAIN; - if (mg = SvTIED_mg((SV*)ary, 'P')) { + if ((mg = SvTIED_mg((SV*)ary, 'P'))) { PUSHMARK(SP); XPUSHs(SvTIED_obj((SV*)ary, mg)); } @@ -5276,8 +5276,8 @@ PP(pp_lock) PP(pp_threadsv) { - djSP; #ifdef USE_THREADS + djSP; EXTEND(SP, 1); if (PL_op->op_private & OPpLVAL_INTRO) PUSHs(*save_threadsv(PL_op->op_targ)); diff --git a/pp_ctl.c b/pp_ctl.c index 5523592..22db833 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -859,7 +859,7 @@ PP(pp_sort) up = myorigmark + 1; while (MARK < SP) { /* This may or may not shift down one here. */ /*SUPPRESS 560*/ - if (*up = *++MARK) { /* Weed out nulls. */ + if ((*up = *++MARK)) { /* Weed out nulls. */ SvTEMP_off(*up); if (!PL_sortcop && !SvPOK(*up)) { STRLEN n_a; @@ -1238,7 +1238,6 @@ Perl_dounwind(pTHX_ I32 cxix) { dTHR; register PERL_CONTEXT *cx; - SV **newsp; I32 optype; while (cxstack_ix > cxix) { @@ -1322,7 +1321,6 @@ Perl_qerror(pTHX_ SV *err) OP * Perl_die_where(pTHX_ char *message, STRLEN msglen) { - dSP; STRLEN n_a; if (PL_in_eval) { I32 cxix; @@ -2053,7 +2051,7 @@ S_dofindlabel(pTHX_ OP *o, char *label, OP **opstack, OP **oplimit) (ops[-1]->op_type != OP_NEXTSTATE && ops[-1]->op_type != OP_DBSTATE))) *ops++ = kid; - if (o = dofindlabel(kid, label, ops, oplimit)) + if ((o = dofindlabel(kid, label, ops, oplimit))) return o; } } @@ -2147,7 +2145,6 @@ PP(pp_goto) } else if (CvXSUB(cv)) { /* put GvAV(defgv) back onto stack */ AV* av; - int i; #ifdef USE_THREADS av = (AV*)PL_curpad[0]; #else @@ -2600,7 +2597,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, char *code, AV** avp) I32 gimme = 0; /* SUSPECT - INITIALZE TO WHAT? NI-S */ I32 optype; OP dummy; - OP *oop = PL_op, *rop; + OP *rop; char tbuf[TYPE_DIGITS(long) + 12 + 10]; char *tmpbuf = tbuf; char *safestr; @@ -3997,7 +3994,7 @@ S_qsortsv(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) on the correct side of the partition. If I find a greater value, then stop the scan. */ - while (still_work_on_left = (u_right >= part_left)) { + while ((still_work_on_left = (u_right >= part_left))) { s = qsort_cmp(u_right, pc_left); if (s < 0) { --u_right; @@ -4018,7 +4015,7 @@ S_qsortsv(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) /* Do a mirror image scan of uncompared values on the right */ - while (still_work_on_right = (u_left <= part_right)) { + while ((still_work_on_right = (u_left <= part_right))) { s = qsort_cmp(pc_right, u_left); if (s < 0) { ++u_left; diff --git a/pp_hot.c b/pp_hot.c index d2eef9b..beb2cf2 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -107,7 +107,6 @@ PP(pp_and) PP(pp_sassign) { djSP; dPOPTOPssrl; - MAGIC *mg; if (PL_op->op_private & OPpASSIGN_BACKWARDS) { SV *temp; @@ -335,7 +334,7 @@ PP(pp_print) gv = (GV*)*++MARK; else gv = PL_defoutgv; - if (mg = SvTIED_mg((SV*)gv, 'q')) { + if ((mg = SvTIED_mg((SV*)gv, 'q'))) { if (MARK == ORIGMARK) { /* If using default handle then we need to make space to * pass object as 1st arg, so move other args up ... @@ -626,7 +625,6 @@ S_do_maybe_phash(pTHX_ AV *ary, SV **lelem, SV **firstlelem, SV **relem, SV **lastrelem) { OP *leftop; - SV *tmpstr; I32 i; leftop = ((BINOP*)PL_op)->op_last; @@ -737,7 +735,7 @@ PP(pp_aassign) EXTEND_MORTAL(lastrelem - firstrelem + 1); for (relem = firstrelem; relem <= lastrelem; relem++) { /*SUPPRESS 560*/ - if (sv = *relem) { + if ((sv = *relem)) { TAINT_NOT; /* Each item is independent */ *relem = sv_mortalcopy(sv); } @@ -979,7 +977,7 @@ PP(pp_match) truebase = t = s; /* XXXX What part of this is needed with true \G-support? */ - if (global = pm->op_pmflags & PMf_GLOBAL) { + if ((global = pm->op_pmflags & PMf_GLOBAL)) { rx->startp[0] = -1; if (SvTYPE(TARG) >= SVt_PVMG && SvMAGIC(TARG)) { MAGIC* mg = mg_find(TARG, 'g'); @@ -1157,7 +1155,7 @@ Perl_do_readline(pTHX) I32 gimme = GIMME_V; MAGIC *mg; - if (mg = SvTIED_mg((SV*)PL_last_in_gv, 'q')) { + if ((mg = SvTIED_mg((SV*)PL_last_in_gv, 'q'))) { PUSHMARK(SP); XPUSHs(SvTIED_obj((SV*)PL_last_in_gv, mg)); PUTBACK; @@ -1659,9 +1657,9 @@ PP(pp_iter) SvREFCNT_dec(*itersvp); - if (sv = (SvMAGICAL(av)) - ? *av_fetch(av, ++cx->blk_loop.iterix, FALSE) - : AvARRAY(av)[++cx->blk_loop.iterix]) + if ((sv = SvMAGICAL(av) + ? *av_fetch(av, ++cx->blk_loop.iterix, FALSE) + : AvARRAY(av)[++cx->blk_loop.iterix])) SvTEMP_off(sv); else sv = &PL_sv_undef; @@ -1712,7 +1710,6 @@ PP(pp_subst) STRLEN len; int force_on_match = 0; I32 oldsave = PL_savestack_ix; - I32 update_minmatch = 1; /* known replacement string? */ dstr = (pm->op_pmflags & PMf_CONST) ? POPs : Nullsv; @@ -1818,7 +1815,7 @@ PP(pp_subst) SvCUR_set(TARG, m - s); } /*SUPPRESS 560*/ - else if (i = m - s) { /* faster from front */ + else if ((i = m - s)) { /* faster from front */ d -= clen; m = d; sv_chop(TARG, d-i); @@ -1847,7 +1844,7 @@ PP(pp_subst) rxtainted |= RX_MATCH_TAINTED(rx); m = rx->startp[0] + orig; /*SUPPRESS 560*/ - if (i = m - s) { + if ((i = m - s)) { if (s != d) Move(s, d, i, char); d += i; @@ -2145,7 +2142,6 @@ PP(pp_leavesublv) : "an uninitialized value"); } else { - mortalize: /* Can be a localized value subject to deletion. */ PL_tmps_stack[++PL_tmps_ix] = *mark; (void)SvREFCNT_inc(*mark); @@ -2223,8 +2219,8 @@ S_get_db_sub(pTHX_ SV **svp, CV *cv) } } else { - SvUPGRADE(dbsv, SVt_PVIV); - SvIOK_on(dbsv); + (void)SvUPGRADE(dbsv, SVt_PVIV); + (void)SvIOK_on(dbsv); SAVEIV(SvIVX(dbsv)); SvIVX(dbsv) = PTR2IV(cv); /* Do it the quickest way */ } @@ -2795,7 +2791,6 @@ PP(pp_method_named) STATIC SV * S_method_common(pTHX_ SV* meth, U32* hashp) { - djSP; SV* sv; SV* ob; GV* gv; diff --git a/pp_sys.c b/pp_sys.c index ee8605c..da352a2 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -521,7 +521,7 @@ PP(pp_open) if (GvIOp(gv)) IoFLAGS(GvIOp(gv)) &= ~IOf_UNTAINT; - if (mg = SvTIED_mg((SV*)gv, 'q')) { + if ((mg = SvTIED_mg((SV*)gv, 'q'))) { PUSHMARK(SP); XPUSHs(SvTIED_obj((SV*)gv, mg)); XPUSHs(sv); @@ -556,7 +556,7 @@ PP(pp_close) else gv = (GV*)POPs; - if (mg = SvTIED_mg((SV*)gv, 'q')) { + if ((mg = SvTIED_mg((SV*)gv, 'q'))) { PUSHMARK(SP); XPUSHs(SvTIED_obj((SV*)gv, mg)); PUTBACK; @@ -797,7 +797,7 @@ PP(pp_untie) if (ckWARN(WARN_UNTIE)) { MAGIC * mg ; - if (mg = SvTIED_mg(sv, how)) { + if ((mg = SvTIED_mg(sv, how))) { if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1) Perl_warner(aTHX_ WARN_UNTIE, "untie attempted while %"UVuf" inner references still exist", @@ -816,7 +816,7 @@ PP(pp_tied) char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV) ? 'P' : 'q'; MAGIC *mg; - if (mg = SvTIED_mg(sv, how)) { + if ((mg = SvTIED_mg(sv, how))) { SV *osv = SvTIED_obj(sv, mg); if (osv == mg->mg_obj) osv = sv_mortalcopy(osv); @@ -1085,7 +1085,7 @@ PP(pp_getc) else gv = (GV*)POPs; - if (mg = SvTIED_mg((SV*)gv, 'q')) { + if ((mg = SvTIED_mg((SV*)gv, 'q'))) { I32 gimme = GIMME_V; PUSHMARK(SP); XPUSHs(SvTIED_obj((SV*)gv, mg)); @@ -1309,7 +1309,7 @@ PP(pp_prtf) else gv = PL_defoutgv; - if (mg = SvTIED_mg((SV*)gv, 'q')) { + if ((mg = SvTIED_mg((SV*)gv, 'q'))) { if (MARK == ORIGMARK) { MEXTEND(SP, 1); ++MARK; @@ -3459,7 +3459,7 @@ PP(pp_readdir) if (GIMME == G_ARRAY) { /*SUPPRESS 560*/ - while (dp = (Direntry_t *)PerlDir_read(IoDIRP(io))) { + while ((dp = (Direntry_t *)PerlDir_read(IoDIRP(io)))) { #ifdef DIRNAMLEN sv = newSVpvn(dp->d_name, dp->d_namlen); #else @@ -3618,7 +3618,7 @@ PP(pp_fork) RETSETUNDEF; if (!childpid) { /*SUPPRESS 560*/ - if (tmpgv = gv_fetchpv("$", TRUE, SVt_PV)) + if ((tmpgv = gv_fetchpv("$", TRUE, SVt_PV))) sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid()); hv_clear(PL_pidstatus); /* no kids, so don't wait for 'em */ } @@ -4035,7 +4035,6 @@ PP(pp_gmtime) EXTEND(SP, 9); EXTEND_MORTAL(9); if (GIMME != G_ARRAY) { - dTARGET; SV *tsv; if (!tmbuf) RETPUSHUNDEF; @@ -4993,7 +4992,6 @@ PP(pp_syscall) unsigned long a[20]; register I32 i = 0; I32 retval = -1; - MAGIC *mg; STRLEN n_a; if (PL_tainting) { diff --git a/proto.h b/proto.h index 4ea8472..c5a29fc 100644 --- a/proto.h +++ b/proto.h @@ -1217,8 +1217,10 @@ STATIC SV* S_new_constant(pTHX_ char *s, STRLEN len, const char *key, SV *sv, SV STATIC int S_ao(pTHX_ int toketype); STATIC void S_depcom(pTHX); STATIC char* S_incl_perldb(pTHX); +#if 0 STATIC I32 S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen); STATIC I32 S_utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen); +#endif # if defined(CRIPPLED_CC) STATIC int S_uni(pTHX_ I32 f, char *s); # endif diff --git a/regcomp.c b/regcomp.c index 330dcbe..9768d18 100644 --- a/regcomp.c +++ b/regcomp.c @@ -298,8 +298,6 @@ STATIC void S_cl_and(pTHX_ struct regnode_charclass_class *cl, struct regnode_charclass_class *and_with) { - int value; - if (!(and_with->flags & ANYOF_CLASS) && !(cl->flags & ANYOF_CLASS) && (and_with->flags & ANYOF_LOCALE) == (cl->flags & ANYOF_LOCALE) @@ -323,8 +321,6 @@ S_cl_and(pTHX_ struct regnode_charclass_class *cl, STATIC void S_cl_or(pTHX_ struct regnode_charclass_class *cl, struct regnode_charclass_class *or_with) { - int value; - if (or_with->flags & ANYOF_INVERT) { /* We do not use * (B1 | CL1) | (!B2 & !CL2) = (B1 | !B2 & !CL2) | (CL1 | (!B2 & !CL2)) @@ -602,7 +598,7 @@ S_study_chunk(pTHX_ regnode **scanp, I32 *deltap, regnode *last, scan_data_t *da && !ANYOF_BITMAP_TEST(data->start_class, *STRING(scan)) && (!(data->start_class->flags & ANYOF_FOLD) || !ANYOF_BITMAP_TEST(data->start_class, - PL_fold[*STRING(scan)]))) + PL_fold[*(U8*)STRING(scan)]))) compat = 0; ANYOF_CLASS_ZERO(data->start_class); ANYOF_BITMAP_ZERO(data->start_class); @@ -644,7 +640,7 @@ S_study_chunk(pTHX_ regnode **scanp, I32 *deltap, regnode *last, scan_data_t *da if (!(data->start_class->flags & (ANYOF_CLASS | ANYOF_LOCALE)) && !ANYOF_BITMAP_TEST(data->start_class, *STRING(scan)) && !ANYOF_BITMAP_TEST(data->start_class, - PL_fold[*STRING(scan)])) + PL_fold[*(U8*)STRING(scan)])) compat = 0; ANYOF_CLASS_ZERO(data->start_class); ANYOF_BITMAP_ZERO(data->start_class); @@ -771,9 +767,9 @@ S_study_chunk(pTHX_ regnode **scanp, I32 *deltap, regnode *last, scan_data_t *da Perl_warner(aTHX_ WARN_REGEXP, "Strange *+?{} on zero-length expression"); min += minnext * mincount; - is_inf_internal |= (maxcount == REG_INFTY - && (minnext + deltanext) > 0 - || deltanext == I32_MAX); + is_inf_internal |= ((maxcount == REG_INFTY + && (minnext + deltanext) > 0) + || deltanext == I32_MAX); is_inf |= is_inf_internal; delta += (minnext + deltanext) * maxcount - minnext * mincount; @@ -1326,9 +1322,6 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm) dTHR; register regexp *r; regnode *scan; - SV **longest; - SV *longest_fixed; - SV *longest_float; regnode *first; I32 flags; I32 minlen = 0; @@ -2874,7 +2867,6 @@ S_regclass(pTHX) register I32 lastvalue = OOB_CHAR8; register I32 range = 0; register regnode *ret; - register I32 def; I32 numlen; I32 namedclass; char *rangebegin; @@ -3704,7 +3696,6 @@ S_regtail(pTHX_ regnode *p, regnode *val) dTHR; register regnode *scan; register regnode *temp; - register I32 offset; if (SIZE_ONLY) return; @@ -3773,7 +3764,7 @@ S_dumpuntil(pTHX_ regnode *start, regnode *node, regnode *last, SV* sv, I32 l) { #ifdef DEBUGGING register U8 op = EXACT; /* Arbitrary non-END op. */ - register regnode *next, *onode; + register regnode *next; while (op != END && (!last || node < last)) { /* While that wasn't END last time... */ diff --git a/regexec.c b/regexec.c index 4775e49..3b6d857 100644 --- a/regexec.c +++ b/regexec.c @@ -1274,10 +1274,9 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * register char *s; register regnode *c; register char *startpos = stringarg; - register I32 tmp; I32 minlen; /* must match at least this many chars */ I32 dontbother = 0; /* how many characters not to try at end */ - I32 start_shift = 0; /* Offset of the start to find + /* I32 start_shift = 0; */ /* Offset of the start to find constant substr. */ /* CC */ I32 end_shift = 0; /* Same for the end. */ /* CC */ I32 scream_pos = -1; /* Internal iterator of scream. */ @@ -1466,7 +1465,6 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * prog->anchored_substr ? prog->anchored_offset : prog->float_max_offset; I32 back_min = prog->anchored_substr ? prog->anchored_offset : prog->float_min_offset; - I32 delta = back_max - back_min; char *last = HOPc(strend, /* Cannot start after this */ -(I32)(CHR_SVLEN(must) - (SvTAIL(must) != 0) + back_min)); @@ -1516,7 +1514,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * } goto phooey; } - else if (c = prog->regstclass) { + else if ((c = prog->regstclass)) { if (minlen && PL_regkind[(U8)OP(prog->regstclass)] != EXACT) /* don't bother with what can't match */ strend = HOPc(strend, -(minlen - 1)); @@ -1527,7 +1525,6 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * dontbother = 0; if (prog->float_substr != Nullsv) { /* Trim the end. */ char *last; - I32 oldpos = scream_pos; if (flags & REXEC_SCREAM) { last = screaminstr(sv, prog->float_substr, s - strbeg, @@ -1894,12 +1891,12 @@ S_regmatch(pTHX_ regnode *prog) nextchr = UCHARAT(locinput); break; } - if (!nextchr && locinput >= PL_regeol || nextchr == '\n') + if ((!nextchr && locinput >= PL_regeol) || nextchr == '\n') sayNO; nextchr = UCHARAT(++locinput); break; case REG_ANY: - if (!nextchr && locinput >= PL_regeol || nextchr == '\n') + if ((!nextchr && locinput >= PL_regeol) || nextchr == '\n') sayNO; nextchr = UCHARAT(++locinput); break; @@ -2765,7 +2762,7 @@ S_regmatch(pTHX_ regnode *prog) *PL_reglastparen = n; scan = next; /*SUPPRESS 560*/ - if (n = (c1 == BRANCH ? NEXT_OFF(next) : ARG(next))) + if ((n = (c1 == BRANCH ? NEXT_OFF(next) : ARG(next)))) next += n; else next = NULL; @@ -3609,7 +3606,6 @@ S_reginclassutf8(pTHX_ regnode *f, U8 *p) if (swash_fetch(sv, p)) match = TRUE; else if (flags & ANYOF_FOLD) { - I32 cf; U8 tmpbuf[UTF8_MAXLEN]; if (flags & ANYOF_LOCALE) { PL_reg_flags |= RF_tainted; diff --git a/regexp.h b/regexp.h index 9e86a1e..ca0e9ed 100644 --- a/regexp.h +++ b/regexp.h @@ -94,7 +94,7 @@ typedef struct regexp { #define REXEC_NOT_FIRST 0x10 /* This is another iteration of //g. */ #define REXEC_ML 0x20 /* $* was set. */ -#define ReREFCNT_inc(re) ((re && re->refcnt++), re) +#define ReREFCNT_inc(re) ((void)(re && re->refcnt++), re) #define ReREFCNT_dec(re) CALLREGFREE(aTHX_ re) #define FBMcf_TAIL_DOLLAR 1 diff --git a/run.c b/run.c index 57f90de..728b761 100644 --- a/run.c +++ b/run.c @@ -22,7 +22,7 @@ Perl_runops_standard(pTHX) { dTHR; - while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) ) { + while ((PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX))) { PERL_ASYNC_CHECK(); } @@ -53,7 +53,7 @@ Perl_runops_debug(pTHX) DEBUG_t(debop(PL_op)); DEBUG_P(debprof(PL_op)); } - } while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) ); + } while ((PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX))); TAINT_NOT; return 0; diff --git a/scope.c b/scope.c index 3680a88..3b9f0d1 100644 --- a/scope.c +++ b/scope.c @@ -79,7 +79,6 @@ PERL_SI * Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems) { PERL_SI *si; - PERL_CONTEXT *cxt; New(56, si, 1, PERL_SI); si->si_stack = newAV(); AvREAL_off(si->si_stack); diff --git a/sv.c b/sv.c index 2312eb0..f0fcfc0 100644 --- a/sv.c +++ b/sv.c @@ -1938,11 +1938,9 @@ Perl_sv_2pv_nolen(pTHX_ register SV *sv) static char * uiv_2buf(char *buf, IV iv, UV uv, int is_uv, char **peob) { - STRLEN len; char *ptr = buf + TYPE_CHARS(UV); char *ebuf = ptr; int sign; - char *p; if (is_uv) sign = 0; @@ -2033,7 +2031,7 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp) int right = 4; U16 reganch = (re->reganch & PMf_COMPILETIME) >> 12; - while(ch = *fptr++) { + while((ch = *fptr++)) { if(reganch & 1) { reflags[left++] = ch; } @@ -3091,7 +3089,7 @@ Perl_sv_catsv(pTHX_ SV *dstr, register SV *sstr) STRLEN len; if (!sstr) return; - if (s = SvPV(sstr, len)) { + if ((s = SvPV(sstr, len))) { if (SvUTF8(sstr)) sv_utf8_upgrade(dstr); sv_catpvn(dstr,s,len); @@ -3502,7 +3500,7 @@ Perl_sv_insert(pTHX_ SV *bigstr, STRLEN offset, STRLEN len, char *little, STRLEN SvCUR_set(bigstr, mid - big); } /*SUPPRESS 560*/ - else if (i = mid - big) { /* faster from front */ + else if ((i = mid - big)) { /* faster from front */ midend -= littlelen; mid = midend; sv_chop(bigstr,midend-i); @@ -3949,7 +3947,6 @@ Perl_sv_cmp(pTHX_ register SV *str1, register SV *str2) STRLEN cur1, cur2; char *pv1, *pv2; I32 retval; - bool utf1; if (str1) { pv1 = SvPV(str1, cur1); @@ -5471,7 +5468,7 @@ Perl_sv_tainted(pTHX_ SV *sv) { if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { MAGIC *mg = mg_find(sv, 't'); - if (mg && ((mg->mg_len & 1) || (mg->mg_len & 2) && mg->mg_obj == sv)) + if (mg && ((mg->mg_len & 1) || ((mg->mg_len & 2) && mg->mg_obj == sv))) return TRUE; } return FALSE; @@ -6610,9 +6607,6 @@ char *PL_watch_pvx; SV * Perl_sv_dup(pTHX_ SV *sstr) { - U32 sflags; - int dtype; - int stype; SV *dstr; if (!sstr || SvTYPE(sstr) == SVTYPEMASK) @@ -6847,7 +6841,6 @@ Perl_sv_dup(pTHX_ SV *sstr) SvSTASH(dstr) = hv_dup_inc(SvSTASH(sstr)); HvRITER((HV*)dstr) = HvRITER((HV*)sstr); if (HvARRAY((HV*)sstr)) { - HE *entry; STRLEN i = 0; XPVHV *dxhv = (XPVHV*)SvANY(dstr); XPVHV *sxhv = (XPVHV*)SvANY(sstr); @@ -7334,8 +7327,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, * their pointers copied. */ IV i; - SV *sv; - SV **svp; # ifdef PERL_OBJECT CPerlObj *pPerl = new(ipM) CPerlObj(ipM, ipMS, ipMP, ipE, ipStd, ipLIO, ipD, ipS, ipP); @@ -7367,8 +7358,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, # endif /* PERL_OBJECT */ #else /* !PERL_IMPLICIT_SYS */ IV i; - SV *sv; - SV **svp; PerlInterpreter *my_perl = (PerlInterpreter*)PerlMem_malloc(sizeof(PerlInterpreter)); PERL_SET_THX(my_perl); @@ -8011,10 +8000,10 @@ do_clean_named_objs(pTHXo_ SV *sv) { if (SvTYPE(sv) == SVt_PVGV && GvGP(sv)) { if ( SvOBJECT(GvSV(sv)) || - GvAV(sv) && SvOBJECT(GvAV(sv)) || - GvHV(sv) && SvOBJECT(GvHV(sv)) || - GvIO(sv) && SvOBJECT(GvIO(sv)) || - GvCV(sv) && SvOBJECT(GvCV(sv)) ) + (GvAV(sv) && SvOBJECT(GvAV(sv))) || + (GvHV(sv) && SvOBJECT(GvHV(sv))) || + (GvIO(sv) && SvOBJECT(GvIO(sv))) || + (GvCV(sv) && SvOBJECT(GvCV(sv))) ) { DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning named glob object:\n "), sv_dump(sv));) SvREFCNT_dec(sv); diff --git a/sv.h b/sv.h index e583204..245199f 100644 --- a/sv.h +++ b/sv.h @@ -511,19 +511,19 @@ Set the length of the string which is in the SV. See C. #define SvOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) #define SvIOKp(sv) (SvFLAGS(sv) & SVp_IOK) -#define SvIOKp_on(sv) (SvOOK_off(sv), SvFLAGS(sv) |= SVp_IOK) +#define SvIOKp_on(sv) ((void)SvOOK_off(sv), SvFLAGS(sv) |= SVp_IOK) #define SvNOKp(sv) (SvFLAGS(sv) & SVp_NOK) #define SvNOKp_on(sv) (SvFLAGS(sv) |= SVp_NOK) #define SvPOKp(sv) (SvFLAGS(sv) & SVp_POK) #define SvPOKp_on(sv) (SvFLAGS(sv) |= SVp_POK) #define SvIOK(sv) (SvFLAGS(sv) & SVf_IOK) -#define SvIOK_on(sv) (SvOOK_off(sv), \ +#define SvIOK_on(sv) ((void)SvOOK_off(sv), \ SvFLAGS(sv) |= (SVf_IOK|SVp_IOK)) #define SvIOK_off(sv) (SvFLAGS(sv) &= ~(SVf_IOK|SVp_IOK|SVf_IVisUV)) -#define SvIOK_only(sv) (SvOK_off(sv), \ +#define SvIOK_only(sv) ((void)SvOK_off(sv), \ SvFLAGS(sv) |= (SVf_IOK|SVp_IOK)) -#define SvIOK_only_UV(sv) (SvOK_off_exc_UV(sv), \ +#define SvIOK_only_UV(sv) ((void)SvOK_off_exc_UV(sv), \ SvFLAGS(sv) |= (SVf_IOK|SVp_IOK)) #define SvIOK_UV(sv) ((SvFLAGS(sv) & (SVf_IOK|SVf_IVisUV)) \ @@ -538,7 +538,7 @@ Set the length of the string which is in the SV. See C. #define SvNOK(sv) (SvFLAGS(sv) & SVf_NOK) #define SvNOK_on(sv) (SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) #define SvNOK_off(sv) (SvFLAGS(sv) &= ~(SVf_NOK|SVp_NOK)) -#define SvNOK_only(sv) (SvOK_off(sv), \ +#define SvNOK_only(sv) ((void)SvOK_off(sv), \ SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) #define SvUTF8(sv) (SvFLAGS(sv) & SVf_UTF8) @@ -556,7 +556,7 @@ Set the length of the string which is in the SV. See C. SvFLAGS(sv) |= (SVf_POK|SVp_POK)) #define SvOOK(sv) (SvFLAGS(sv) & SVf_OOK) -#define SvOOK_on(sv) (SvIOK_off(sv), SvFLAGS(sv) |= SVf_OOK) +#define SvOOK_on(sv) ((void)SvIOK_off(sv), SvFLAGS(sv) |= SVf_OOK) #define SvOOK_off(sv) (SvOOK(sv) && sv_backoff(sv)) #define SvFAKE(sv) (SvFLAGS(sv) & SVf_FAKE) diff --git a/toke.c b/toke.c index 5449c2f..322e194 100644 --- a/toke.c +++ b/toke.c @@ -319,6 +319,7 @@ S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen) } #endif +#if 0 STATIC I32 S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen) { @@ -329,7 +330,6 @@ S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen) New(898, tmps, SvCUR(sv) * 3 / 2 + 1, U8); tend = utf16_to_utf8((U16*)SvPVX(sv), tmps, SvCUR(sv)); sv_usepvn(sv, (char*)tmps, tend - tmps); - } return count; } @@ -344,10 +344,10 @@ S_utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen) New(898, tmps, SvCUR(sv) * 3 / 2 + 1, U8); tend = utf16_to_utf8_reversed((U16*)SvPVX(sv), tmps, SvCUR(sv)); sv_usepvn(sv, (char*)tmps, tend - tmps); - } return count; } +#endif /* * Perl_lex_start @@ -861,7 +861,7 @@ S_force_version(pTHX_ char *s) version = yylval.opval; ver = cSVOPx(version)->op_sv; if (SvPOK(ver) && !SvNIOK(ver)) { - SvUPGRADE(ver, SVt_PVNV); + (void)SvUPGRADE(ver, SVt_PVNV); SvNVX(ver) = str_to_version(ver); SvNOK_on(ver); /* hint that it is a version */ } @@ -1269,8 +1269,10 @@ S_scan_const(pTHX_ char *start) if (s[2] == '#') { while (s < send && *s != ')') *d++ = *s++; - } else if (s[2] == '{' /* This should match regcomp.c */ - || (s[2] == 'p' || s[2] == '?') && s[3] == '{') { + } + else if (s[2] == '{' /* This should match regcomp.c */ + || ((s[2] == 'p' || s[2] == '?') && s[3] == '{')) + { I32 count = 1; char *regparse = s + (s[2] == '{' ? 3 : 4); char c; @@ -1464,12 +1466,9 @@ S_scan_const(pTHX_ char *start) ++s; if (*s == '{') { char* e = strchr(s, '}'); - HV *hv; - SV **svp; - SV *res, *cv; + SV *res; STRLEN len; char *str; - char *why = Nullch; if (!e) { yyerror("Missing right brace on \\N{}"); @@ -2613,8 +2612,8 @@ Perl_yylex(pTHX) } d = moreswitches(d); } while (d); - if (PERLDB_LINE && !oldpdb || - ( PL_minus_n || PL_minus_p ) && !(oldn || oldp) ) + if ((PERLDB_LINE && !oldpdb) || + ((PL_minus_n || PL_minus_p) && !(oldn || oldp))) /* if we have already added "LINE: while (<>) {", we must not do it again */ { @@ -3336,7 +3335,7 @@ Perl_yylex(pTHX) else if (isIDFIRST_lazy_if(s,UTF)) { char tmpbuf[sizeof PL_tokenbuf]; scan_word(s, tmpbuf, sizeof tmpbuf, TRUE, &len); - if (tmp = keyword(tmpbuf, len)) { + if ((tmp = keyword(tmpbuf, len))) { /* binary operators exclude handle interpretations */ switch (tmp) { case -KEY_x: @@ -3578,7 +3577,6 @@ Perl_yylex(pTHX) case 'z': case 'Z': keylookup: { - STRLEN n_a; gv = Nullgv; gvp = 0; @@ -3586,10 +3584,10 @@ Perl_yylex(pTHX) s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len); /* Some keywords can be followed by any delimiter, including ':' */ - tmp = (len == 1 && strchr("msyq", PL_tokenbuf[0]) || - len == 2 && ((PL_tokenbuf[0] == 't' && PL_tokenbuf[1] == 'r') || - (PL_tokenbuf[0] == 'q' && - strchr("qwxr", PL_tokenbuf[1])))); + tmp = ((len == 1 && strchr("msyq", PL_tokenbuf[0])) || + (len == 2 && ((PL_tokenbuf[0] == 't' && PL_tokenbuf[1] == 'r') || + (PL_tokenbuf[0] == 'q' && + strchr("qwxr", PL_tokenbuf[1]))))); /* x::* is just a word, unless x is "CORE" */ if (!tmp && *s == ':' && s[1] == ':' && strNE(PL_tokenbuf, "CORE")) @@ -3672,7 +3670,7 @@ Perl_yylex(pTHX) /* Get the rest if it looks like a package qualifier */ - if (*s == '\'' || *s == ':' && s[1] == ':') { + if (*s == '\'' || (*s == ':' && s[1] == ':')) { STRLEN morelen; s = scan_word(s, PL_tokenbuf + len, sizeof PL_tokenbuf - len, TRUE, &morelen); @@ -5852,7 +5850,7 @@ S_scan_ident(pTHX_ register char *s, register char *send, char *dest, STRLEN des d++; if (UTF) { e = s; - while (e < send && isALNUM_lazy_if(e,UTF) || *e == ':') { + while ((e < send && isALNUM_lazy_if(e,UTF)) || *e == ':') { e += UTF8SKIP(e); while (e < send && *e & 0x80 && is_utf8_mark((U8*)e)) e += UTF8SKIP(e); diff --git a/universal.c b/universal.c index 0e5a89b..f6b25a4 100644 --- a/universal.c +++ b/universal.c @@ -86,7 +86,6 @@ for class names as well as for objects. bool Perl_sv_derived_from(pTHX_ SV *sv, const char *name) { - SV *rv; char *type; HV *stash; @@ -110,7 +109,6 @@ Perl_sv_derived_from(pTHX_ SV *sv, const char *name) (stash && isa_lookup(stash, name, strlen(name), 0) == &PL_sv_yes) ? TRUE : FALSE ; - } void XS_UNIVERSAL_isa(pTHXo_ CV *cv); @@ -250,7 +248,7 @@ XS(XS_UNIVERSAL_VERSION) } /* they said C and $Foo::VERSION * doesn't look like a float: force numeric compare */ - SvUPGRADE(sv, SVt_PVNV); + (void)SvUPGRADE(sv, SVt_PVNV); SvNVX(sv) = str_to_version(sv); SvPOK_off(sv); SvNOK_on(sv); diff --git a/util.c b/util.c index 091e162..4b0e1c5 100644 --- a/util.c +++ b/util.c @@ -154,7 +154,9 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) Free_t Perl_safesysfree(Malloc_t where) { +#ifdef PERL_IMPLICIT_SYS dTHX; +#endif DEBUG_m( PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) free\n",PTR2UV(where),(long)PL_an++)); if (where) { /*SUPPRESS 701*/ @@ -699,8 +701,8 @@ Perl_init_i18nl10n(pTHX_ int printwarn) if (setlocale_failure) { char *p; bool locwarn = (printwarn > 1 || - printwarn && - (!(p = PerlEnv_getenv("PERL_BADLANG")) || atoi(p))); + (printwarn && + (!(p = PerlEnv_getenv("PERL_BADLANG")) || atoi(p)))); if (locwarn) { #ifdef LC_ALL @@ -995,17 +997,15 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit register I32 multiline = flags & FBMrf_MULTILINE; if (bigend - big < littlelen) { - check_tail: if ( SvTAIL(littlestr) && (bigend - big == littlelen - 1) && (littlelen == 1 - || *big == *little && memEQ(big, little, littlelen - 1))) + || (*big == *little && memEQ(big, little, littlelen - 1)))) return (char*)big; return Nullch; } if (littlelen <= 2) { /* Special-cased */ - register char c; if (littlelen == 1) { if (SvTAIL(littlestr) && !multiline) { /* Anchor only! */ @@ -1157,7 +1157,6 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit while (tmp--) { if (*--s == *--little) continue; - differ: s = olds + 1; /* here we pay the price for failure */ little = oldlittle; if (s < bigend) /* fake up continue to outer loop */ @@ -2356,7 +2355,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode) } #endif /* defined OS2 */ /*SUPPRESS 560*/ - if (tmpgv = gv_fetchpv("$",TRUE, SVt_PV)) + if ((tmpgv = gv_fetchpv("$",TRUE, SVt_PV))) sv_setiv(GvSV(tmpgv), PerlProc_getpid()); PL_forkprocess = 0; hv_clear(PL_pidstatus); /* we have no children */ @@ -2651,7 +2650,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags) HE *entry; hv_iterinit(PL_pidstatus); - if (entry = hv_iternext(PL_pidstatus)) { + if ((entry = hv_iternext(PL_pidstatus))) { pid = atoi(hv_iterkey(entry,(I32*)statusp)); sv = hv_iterval(PL_pidstatus,entry); *statusp = SvIVX(sv); diff --git a/xsutils.c b/xsutils.c index 0999f74..02fab51 100644 --- a/xsutils.c +++ b/xsutils.c @@ -48,7 +48,7 @@ modify_SV_attributes(pTHXo_ SV *sv, SV **retlist, SV **attrlist, int numattrs) for (nret = 0 ; numattrs && (attr = *attrlist++); numattrs--) { name = SvPV(attr, len); - if (negated = (*name == '-')) { + if ((negated = (*name == '-'))) { name++; len--; } @@ -271,7 +271,6 @@ usage: XS(XS_attributes__warn_reserved) { dXSARGS; - SV *rv, *sv; #ifdef dXSTARGET dXSTARGET; #else