{
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;
Perl_av_store(pTHX_ register AV *av, I32 key, SV *val)
{
SV** ary;
- U32 fill;
-
if (!av)
return 0;
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);
}
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);
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);
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);
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);
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;
: &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
{
#ifdef DEBUGGING
dTHR;
- register I32 i;
char* file = CopFILE(PL_curcop);
#ifdef USE_THREADS
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;
}
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;
}
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 */
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)
#else
if (cSVOPo->op_sv) {
SV *tmpsv = NEWSV(0,0);
+ STRLEN n_a;
ENTER;
SAVEFREESV(tmpsv);
gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch);
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);
#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
#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
#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
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
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;
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:
(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;
{
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 ? '@' :
{
HV *hv = GvSTASH(gv);
if (!hv) {
- SvOK_off(sv);
+ (void)SvOK_off(sv);
return;
}
sv_setpv(sv, prefix ? prefix : "");
{
dTHR;
GP* gp;
- CV* cv;
if (!gv || !(gp = GvGP(gv)))
return;
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)
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++) {
}
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;
PUSHs((SV*)cv);
PUTBACK;
- if (PL_op = Perl_pp_entersub(aTHX))
+ if ((PL_op = Perl_pp_entersub(aTHX)))
CALLRUNOPS(aTHX);
LEAVE;
SPAGAIN;
/* 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));
}
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));
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) /* @+ */
{
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':
register char *s;
register I32 i;
register REGEXP *rx;
- char *t;
switch (*mg->mg_ptr) {
case '\001': /* ^A */
{
dTHR;
if (PL_lex_state != LEX_NOTPARSING)
- SvOK_off(sv);
+ (void)SvOK_off(sv);
else if (PL_in_eval)
sv_setiv(sv, 1);
else
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;
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));
i = HvKEYS(hv);
else {
/*SUPPRESS 560*/
- while (entry = hv_iternext(hv)) {
+ while ((entry = hv_iternext(hv))) {
i++;
}
}
{
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;
}
SV *lsv = LvTARG(sv);
if (!lsv) {
- SvOK_off(sv);
+ (void)SvOK_off(sv);
return 0;
}
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;
}
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)
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
# 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)
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 */
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
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
{
dTHR;
OP *kid;
- SV *sv;
STRLEN n_a;
if (!o || PL_error_count)
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;
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;
Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *id, OP *arg)
{
OP *pack;
- OP *meth;
OP *rqop;
OP *imop;
OP *veop;
/* 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,
/* 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,
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;
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
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)) {
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))
{
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),
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);
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);
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;
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);
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;
{
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);
#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;
}
}
/* 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);
case 'W':
case 'X':
case 'w':
- if (s = moreswitches(s))
+ if ((s = moreswitches(s)))
goto reswitch;
break;
{
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);
}
S_open_script(pTHX_ char *scriptname, bool dosearch, SV *sv, int *fdscript)
{
dTHR;
- register char *s;
*fdscript = -1;
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? */
while (isDIGIT(s2[-1]) || strchr("-._", s2[-1])) s2--;
if (strnEQ(s2-4,"perl",4))
/*SUPPRESS 530*/
- while (s = moreswitches(s)) ;
+ while ((s = moreswitches(s)))
+ ;
}
}
}
{
dTHR;
GV *tmpgv;
- GV *othergv;
IO *io;
sv_setpvn(get_sv("\"", TRUE), " ", 1);
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);
}
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));
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);
#endif
}
TAINT_NOT;
- if (tmpgv = gv_fetchpv("$",TRUE, SVt_PV))
+ if ((tmpgv = gv_fetchpv("$",TRUE, SVt_PV)))
sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid());
}
# 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)
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;
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;
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;
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.
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);
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)));
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));
}
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));
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;
{
dTHR;
register PERL_CONTEXT *cx;
- SV **newsp;
I32 optype;
while (cxstack_ix > cxix) {
OP *
Perl_die_where(pTHX_ char *message, STRLEN msglen)
{
- dSP;
STRLEN n_a;
if (PL_in_eval) {
I32 cxix;
(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;
}
}
}
else if (CvXSUB(cv)) { /* put GvAV(defgv) back onto stack */
AV* av;
- int i;
#ifdef USE_THREADS
av = (AV*)PL_curpad[0];
#else
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;
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;
/* 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;
PP(pp_sassign)
{
djSP; dPOPTOPssrl;
- MAGIC *mg;
if (PL_op->op_private & OPpASSIGN_BACKWARDS) {
SV *temp;
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 ...
SV **lastrelem)
{
OP *leftop;
- SV *tmpstr;
I32 i;
leftop = ((BINOP*)PL_op)->op_last;
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);
}
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');
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;
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;
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;
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);
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;
: "an uninitialized value");
}
else {
- mortalize:
/* Can be a localized value subject to deletion. */
PL_tmps_stack[++PL_tmps_ix] = *mark;
(void)SvREFCNT_inc(*mark);
}
}
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 */
}
STATIC SV *
S_method_common(pTHX_ SV* meth, U32* hashp)
{
- djSP;
SV* sv;
SV* ob;
GV* gv;
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);
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;
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",
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);
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));
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;
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
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 */
}
EXTEND(SP, 9);
EXTEND_MORTAL(9);
if (GIMME != G_ARRAY) {
- dTARGET;
SV *tsv;
if (!tmbuf)
RETPUSHUNDEF;
unsigned long a[20];
register I32 i = 0;
I32 retval = -1;
- MAGIC *mg;
STRLEN n_a;
if (PL_tainting) {
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
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)
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))
&& !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);
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);
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;
dTHR;
register regexp *r;
regnode *scan;
- SV **longest;
- SV *longest_fixed;
- SV *longest_float;
regnode *first;
I32 flags;
I32 minlen = 0;
register I32 lastvalue = OOB_CHAR8;
register I32 range = 0;
register regnode *ret;
- register I32 def;
I32 numlen;
I32 namedclass;
char *rangebegin;
dTHR;
register regnode *scan;
register regnode *temp;
- register I32 offset;
if (SIZE_ONLY)
return;
{
#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... */
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. */
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));
}
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));
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,
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;
*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;
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;
#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
{
dTHR;
- while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) ) {
+ while ((PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX))) {
PERL_ASYNC_CHECK();
}
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;
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);
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;
int right = 4;
U16 reganch = (re->reganch & PMf_COMPILETIME) >> 12;
- while(ch = *fptr++) {
+ while((ch = *fptr++)) {
if(reganch & 1) {
reflags[left++] = ch;
}
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);
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);
STRLEN cur1, cur2;
char *pv1, *pv2;
I32 retval;
- bool utf1;
if (str1) {
pv1 = SvPV(str1, cur1);
{
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;
SV *
Perl_sv_dup(pTHX_ SV *sstr)
{
- U32 sflags;
- int dtype;
- int stype;
SV *dstr;
if (!sstr || SvTYPE(sstr) == SVTYPEMASK)
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);
* 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);
# 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);
{
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);
#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)) \
#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)
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)
}
#endif
+#if 0
STATIC I32
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;
}
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
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 */
}
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;
++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{}");
}
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 */
{
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:
case 'z': case 'Z':
keylookup: {
- STRLEN n_a;
gv = Nullgv;
gvp = 0;
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"))
/* 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);
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);
bool
Perl_sv_derived_from(pTHX_ SV *sv, const char *name)
{
- SV *rv;
char *type;
HV *stash;
(stash && isa_lookup(stash, name, strlen(name), 0) == &PL_sv_yes)
? TRUE
: FALSE ;
-
}
void XS_UNIVERSAL_isa(pTHXo_ CV *cv);
}
/* they said C<use Foo 1.002_003> 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);
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*/
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
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! */
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 */
}
#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 */
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);
for (nret = 0 ; numattrs && (attr = *attrlist++); numattrs--) {
name = SvPV(attr, len);
- if (negated = (*name == '-')) {
+ if ((negated = (*name == '-'))) {
name++;
len--;
}
XS(XS_attributes__warn_reserved)
{
dXSARGS;
- SV *rv, *sv;
#ifdef dXSTARGET
dXSTARGET;
#else