int
db_fd(db)
DB_File db
- int status = 0 ;
CODE:
CurrentDB = db ;
#ifdef DB_VERSION_MAJOR
RETVAL = -1 ;
- status = (db->in_memory
- ? -1
- : ((db->dbp)->fd)(db->dbp, &RETVAL) ) ;
- if (status != 0)
- RETVAL = -1 ;
+ {
+ int status = 0 ;
+ status = (db->in_memory
+ ? -1
+ : ((db->dbp)->fd)(db->dbp, &RETVAL) ) ;
+ if (status != 0)
+ RETVAL = -1 ;
+ }
#else
RETVAL = (db->in_memory
? -1
AV *seenentry = Nullav;
char *iname;
STRLEN inamelen, idlen = 0;
- U32 flags;
U32 realtype;
if (!val)
return 0;
- flags = SvFLAGS(val);
realtype = SvTYPE(val);
if (SvGMAGICAL(val))
}
ival = SvRV(val);
- flags = SvFLAGS(ival);
realtype = SvTYPE(ival);
(void) sprintf(id, "0x%lx", (unsigned long)ival);
idlen = strlen(id);
HV *seenhv = Nullhv;
AV *postav, *todumpav, *namesav;
I32 level = 0;
- I32 indent, terse, useqq, i, imax, postlen;
+ I32 indent, terse, i, imax, postlen;
SV **svp;
- SV *val, *name, *pad, *xpad, *apad, *sep, *tmp, *varname;
+ SV *val, *name, *pad, *xpad, *apad, *sep, *varname;
SV *freezer, *toaster, *bless;
I32 purity, deepcopy, quotekeys, maxdepth = 0;
char tmpbuf[1024];
todumpav = namesav = Nullav;
seenhv = Nullhv;
- val = pad = xpad = apad = sep = tmp = varname
+ val = pad = xpad = apad = sep = varname
= freezer = toaster = bless = &PL_sv_undef;
name = sv_newmortal();
indent = 2;
- terse = useqq = purity = deepcopy = 0;
+ terse = purity = deepcopy = 0;
quotekeys = 1;
retval = newSVpvn("", 0);
purity = SvIV(*svp);
if ((svp = hv_fetch(hv, "terse", 5, FALSE)))
terse = SvTRUE(*svp);
+#if 0 /* useqq currently unused */
if ((svp = hv_fetch(hv, "useqq", 5, FALSE)))
useqq = SvTRUE(*svp);
+#endif
if ((svp = hv_fetch(hv, "pad", 3, FALSE)))
pad = *svp;
if ((svp = hv_fetch(hv, "xpad", 4, FALSE)))
{
#ifdef HAS_SEM
SV **sv_ptr;
- SV *sv;
struct semid_ds ds;
AV *list = (AV*)SvRV(obj);
if(!sv_isa(obj, "IPC::Semaphore::stat"))
croak("method %s not called a %s object",
"pack","IPC::Semaphore::stat");
- if((sv_ptr = av_fetch(list,0,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,0,TRUE)) && *sv_ptr)
ds.sem_perm.uid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,1,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,1,TRUE)) && *sv_ptr)
ds.sem_perm.gid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,2,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,2,TRUE)) && *sv_ptr)
ds.sem_perm.cuid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,3,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,3,TRUE)) && *sv_ptr)
ds.sem_perm.cgid = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,4,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,4,TRUE)) && *sv_ptr)
ds.sem_perm.mode = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,5,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,5,TRUE)) && *sv_ptr)
ds.sem_ctime = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,6,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,6,TRUE)) && *sv_ptr)
ds.sem_otime = SvIV(*sv_ptr);
- if((sv_ptr = av_fetch(list,7,TRUE)) && (sv = *sv_ptr))
+ if((sv_ptr = av_fetch(list,7,TRUE)) && *sv_ptr)
ds.sem_nsems = SvIV(*sv_ptr);
ST(0) = sv_2mortal(newSVpvn((char *)&ds,sizeof(ds)));
XSRETURN(1);
{
SV *ret;
int index;
- I32 markix;
GV *agv,*bgv,*gv;
HV *stash;
CV *cv;
SAVETMPS;
SAVESPTR(PL_op);
ret = ST(1);
- markix = sp - PL_stack_base;
for(index = 2 ; index < items ; index++) {
GvSV(agv) = ret;
GvSV(bgv) = ST(index);
CODE:
{
int index;
- I32 markix;
GV *gv;
HV *stash;
CV *cv;
PL_curpad = AvARRAY((AV*)AvARRAY(CvPADLIST(cv))[1]);
SAVETMPS;
SAVESPTR(PL_op);
- markix = sp - PL_stack_base;
for(index = 1 ; index < items ; index++) {
GvSV(PL_defgv) = ST(index);
PL_op = reducecop;
PerlIO *
PerlIOScalar_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const char *mode, int fd, int imode, int perm, PerlIO *f, int narg, SV **args)
{
- PerlIOScalar *s;
SV *arg = (narg > 0) ? *args : PerlIOArg;
if (SvROK(arg) || SvPOK(arg))
{
f = PerlIO_allocate(aTHX);
- s = PerlIOSelf(PerlIO_push(aTHX_ f,self,mode,arg),PerlIOScalar);
+ (void)PerlIOSelf(PerlIO_push(aTHX_ f,self,mode,arg),PerlIOScalar);
PerlIOBase(f)->flags |= PERLIO_F_OPEN;
return f;
}
CV *cv=NULL;
CV **cvp=NULL, **ocvp=NULL;
AMT *amtp=NULL, *oamtp=NULL;
- int fl=0, off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
+ int off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
int postpr = 0, force_cpy = 0, assignshift = assign ? 1 : 0;
+#ifdef DEBUGGING
+ int fl=0;
HV* stash=NULL;
+#endif
if (!(AMGf_noleft & flags) && SvAMAGIC(left)
- && (mg = mg_find((SV*)(stash=SvSTASH(SvRV(left))),
+ && (mg = mg_find((SV*)(
+#ifdef DEGUGGING
+ stash=
+#endif
+ SvSTASH(SvRV(left))),
PERL_MAGIC_overload_table))
&& (ocvp = cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (oamtp = amtp = (AMT*)mg->mg_ptr)->table
&& ((cv = cvp[off=method+assignshift])
|| (assign && amtp->fallback > AMGfallNEVER && /* fallback to
* usual method */
- (fl = 1, cv = cvp[off=method])))) {
+ (
+#ifdef DEBUGGING
+ fl = 1,
+#endif
+ cv = cvp[off=method])))) {
lr = -1; /* Call method for left argument */
} else {
if (cvp && amtp->fallback > AMGfallNEVER && flags & AMGf_unary) {
}
if (!cv) goto not_found;
} else if (!(AMGf_noright & flags) && SvAMAGIC(right)
- && (mg = mg_find((SV*)(stash=SvSTASH(SvRV(right))),
+ && (mg = mg_find((SV*)(
+#ifdef DEBUGGING
+ stash=
+#endif
+ SvSTASH(SvRV(right))),
PERL_MAGIC_overload_table))
&& (cvp = (AMT_AMAGIC((AMT*)mg->mg_ptr)
? (amtp = (AMT*)mg->mg_ptr)->table
force_cpy = force_cpy || assign;
}
}
+#ifdef DEBUGGING
if (!notfound) {
- DEBUG_o( Perl_deb(aTHX_
- "Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %s%s\n",
- AMG_id2name(off),
- method+assignshift==off? "" :
- " (initially `",
- method+assignshift==off? "" :
- AMG_id2name(method+assignshift),
- method+assignshift==off? "" : "')",
- flags & AMGf_unary? "" :
- lr==1 ? " for right argument": " for left argument",
- flags & AMGf_unary? " for argument" : "",
- HvNAME(stash),
- fl? ",\n\tassignment variant used": "") );
+ DEBUG_o(Perl_deb(aTHX_
+ "Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %s%s\n",
+ AMG_id2name(off),
+ method+assignshift==off? "" :
+ " (initially `",
+ method+assignshift==off? "" :
+ AMG_id2name(method+assignshift),
+ method+assignshift==off? "" : "')",
+ flags & AMGf_unary? "" :
+ lr==1 ? " for right argument": " for left argument",
+ flags & AMGf_unary? " for argument" : "",
+ HvNAME(stash),
+ fl? ",\n\tassignment variant used": "") );
}
+#endif
/* Since we use shallow copy during assignment, we need
* to dublicate the contents, probably calling user-supplied
* version of copy operator
Perl_mg_length(pTHX_ SV *sv)
{
MAGIC* mg;
- char *junk;
STRLEN len;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
}
}
- junk = SvPV(sv, len);
+ (void)SvPV(sv, len);
return len;
}
Perl_magic_getnkeys(pTHX_ SV *sv, MAGIC *mg)
{
HV *hv = (HV*)LvTARG(sv);
- HE *entry;
I32 i = 0;
-
+
if (hv) {
- (void) hv_iterinit(hv);
- if (! SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
- i = HvKEYS(hv);
- else {
- /*SUPPRESS 560*/
- while ((entry = hv_iternext(hv))) {
- i++;
- }
- }
+ (void) hv_iterinit(hv);
+ if (! SvTIED_mg((SV*)hv, PERL_MAGIC_tied))
+ i = HvKEYS(hv);
+ else {
+ while (hv_iternext(hv))
+ i++;
+ }
}
sv_setiv(sv, (IV)i);
CV *cv = Nullcv;
OP *myop = PL_op;
U32 flags = 0;
- I32 o_save_i = PL_savestack_ix;
XPV *tXpv = PL_Xpv;
#if defined(WIN32) && defined(PERL_IMPLICIT_CONTEXT)
infinity, so we fix 4 (in fact 5): */
if (flags & 1) {
PL_savestack_ix += 5; /* Protect save in progress. */
- o_save_i = PL_savestack_ix;
SAVEDESTRUCTOR_X(unwind_handler_stack, (void*)&flags);
}
if (flags & 4)
OP *next = 0;
OP *listop;
OP *o;
- OP *condop;
U8 loopflags = 0;
if (expr && (expr->op_type == OP_READLINE || expr->op_type == OP_GLOB
return Nullop; /* listop already freed by new_logop */
}
if (listop)
- ((LISTOP*)listop)->op_last->op_next = condop =
+ ((LISTOP*)listop)->op_last->op_next =
(o == listop ? redo : LINKLIST(o));
}
else
if (!names && (O_TEXT != O_BINARY && (mode & O_BINARY)))
{
PerlIO *top = f;
- PerlIOl *l;
- while ((l = *top))
+ while (*top)
{
if (PerlIOBase(top)->tab == &PerlIO_crlf)
{
MAGIC *mg;
SV *discp = Nullsv;
STRLEN len = 0;
- char *names = NULL;
if (MAXARG < 1)
RETPUSHUNDEF;
RETPUSHUNDEF;
}
- if (discp) {
- names = SvPV(discp,len);
- }
-
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
(discp) ? SvPV_nolen(discp) : Nullch))
RETPUSHYES;
&& !deltanext && minnext == 1 ) {
/* Try to optimize to CURLYN. */
regnode *nxt = NEXTOPER(oscan) + EXTRA_STEP_2ARGS;
- regnode *nxt1 = nxt, *nxt2;
+ regnode *nxt1 = nxt;
+#ifdef DEBUGGING
+ regnode *nxt2;
+#endif
/* Skip open. */
nxt = regnext(nxt);
&& !(PL_regkind[(U8)OP(nxt)] == EXACT
&& STR_LEN(nxt) == 1))
goto nogo;
+#ifdef DEBUGGING
nxt2 = nxt;
+#endif
nxt = regnext(nxt);
if (OP(nxt) != CLOSE)
goto nogo;
STRLEN
Perl_sv_len(pTHX_ register SV *sv)
{
- char *junk;
STRLEN len;
if (!sv)
if (SvGMAGICAL(sv))
len = mg_length(sv);
else
- junk = SvPV(sv, len);
+ (void)SvPV(sv, len);
return len;
}
q++;
if (*q == '*') {
q++;
- if (EXPECT_NUMBER(q, epix) && *q++ != '$')
+ if (EXPECT_NUMBER(q, epix) && *q++ != '$') /* epix currently unused */
goto unknown;
if (args)
i = va_arg(*args, int);