summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/Storable/Storable.xs34
-rw-r--r--gv.c2
-rw-r--r--perl.c4
3 files changed, 18 insertions, 22 deletions
diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs
index dfb0f76ea1..f306a49df7 100644
--- a/ext/Storable/Storable.xs
+++ b/ext/Storable/Storable.xs
@@ -1037,11 +1037,11 @@ static void clean_store_context(stcxt_t *cxt)
*/
hv_iterinit(cxt->hseen);
- while (he = hv_iternext(cxt->hseen))
+ while ((he = hv_iternext(cxt->hseen)))
HeVAL(he) = &PL_sv_undef;
hv_iterinit(cxt->hclass);
- while (he = hv_iternext(cxt->hclass))
+ while ((he = hv_iternext(cxt->hclass)))
HeVAL(he) = &PL_sv_undef;
/*
@@ -1296,7 +1296,6 @@ static SV *pkg_fetchmeth(
{
GV *gv;
SV *sv;
- SV **svh;
/*
* The following code is the same as the one performed by UNIVERSAL::can
@@ -1767,7 +1766,7 @@ static int store_array(stcxt_t *cxt, AV *av)
continue;
}
TRACEME(("(#%d) item", i));
- if (ret = store(cxt, *sav))
+ if ((ret = store(cxt, *sav)))
return ret;
}
@@ -1875,7 +1874,7 @@ static int store_hash(stcxt_t *cxt, HV *hv)
TRACEME(("(#%d) value 0x%"UVxf, i, PTR2UV(val)));
- if (ret = store(cxt, val))
+ if ((ret = store(cxt, val)))
goto out;
/*
@@ -1921,7 +1920,7 @@ static int store_hash(stcxt_t *cxt, HV *hv)
TRACEME(("(#%d) value 0x%"UVxf, i, PTR2UV(val)));
- if (ret = store(cxt, val))
+ if ((ret = store(cxt, val)))
goto out;
/*
@@ -2004,7 +2003,7 @@ static int store_tied(stcxt_t *cxt, SV *sv)
* accesses on the retrieved object will indeed call the magic methods...
*/
- if (ret = store(cxt, mg->mg_obj))
+ if ((ret = store(cxt, mg->mg_obj)))
return ret;
TRACEME(("ok (tied)"));
@@ -2043,12 +2042,12 @@ static int store_tied_item(stcxt_t *cxt, SV *sv)
PUTMARK(SX_TIED_KEY);
TRACEME(("store_tied_item: storing OBJ 0x%"UVxf, PTR2UV(mg->mg_obj)));
- if (ret = store(cxt, mg->mg_obj))
+ if ((ret = store(cxt, mg->mg_obj)))
return ret;
TRACEME(("store_tied_item: storing PTR 0x%"UVxf, PTR2UV(mg->mg_ptr)));
- if (ret = store(cxt, (SV *) mg->mg_ptr))
+ if ((ret = store(cxt, (SV *) mg->mg_ptr)))
return ret;
} else {
I32 idx = mg->mg_len;
@@ -2057,7 +2056,7 @@ static int store_tied_item(stcxt_t *cxt, SV *sv)
PUTMARK(SX_TIED_IDX);
TRACEME(("store_tied_item: storing OBJ 0x%"UVxf, PTR2UV(mg->mg_obj)));
- if (ret = store(cxt, mg->mg_obj))
+ if ((ret = store(cxt, mg->mg_obj)))
return ret;
TRACEME(("store_tied_item: storing IDX %d", idx));
@@ -2279,7 +2278,7 @@ static int store_hook(
* Serialize entry if not done already, and get its tag.
*/
- if (svh = hv_fetch(cxt->hseen, (char *) &xsv, sizeof(xsv), FALSE))
+ if ((svh = hv_fetch(cxt->hseen, (char *) &xsv, sizeof(xsv), FALSE)))
goto sv_seen; /* Avoid moving code too far to the right */
TRACEME(("listed object %d at 0x%"UVxf" is unknown", i-1, PTR2UV(xsv)));
@@ -2304,7 +2303,7 @@ static int store_hook(
} else
PUTMARK(flags);
- if (ret = store(cxt, xsv)) /* Given by hook for us to store */
+ if ((ret = store(cxt, xsv))) /* Given by hook for us to store */
return ret;
svh = hv_fetch(cxt->hseen, (char *) &xsv, sizeof(xsv), FALSE);
@@ -2481,7 +2480,7 @@ static int store_hook(
* [<magic object>]
*/
- if (ret = store(cxt, mg->mg_obj))
+ if ((ret = store(cxt, mg->mg_obj)))
return ret;
}
@@ -2618,8 +2617,8 @@ static int store_other(stcxt_t *cxt, SV *sv)
* Store placeholder string as a scalar instead...
*/
- (void) sprintf(buf, "You lost %s(0x%"UVxf")\0", sv_reftype(sv, FALSE),
- PTR2UV(sv));
+ (void) sprintf(buf, "You lost %s(0x%"UVxf")%c", sv_reftype(sv, FALSE),
+ PTR2UV(sv), (char)0);
len = strlen(buf);
STORE_SCALAR(buf, len);
@@ -2702,7 +2701,6 @@ static int store(stcxt_t *cxt, SV *sv)
{
SV **svh;
int ret;
- SV *tag;
int type;
HV *hseen = cxt->hseen;
@@ -3188,7 +3186,6 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
SV *sv;
SV *rv;
int obj_type;
- I32 classname;
int clone = cxt->optype & ST_CLONE;
char mtype = '\0';
unsigned int extra_type = 0;
@@ -4155,7 +4152,6 @@ static SV *retrieve_hash(stcxt_t *cxt, char *cname)
I32 i;
HV *hv;
SV *sv;
- static SV *sv_h_undef = (SV *) 0; /* hv_store() bug */
TRACEME(("retrieve_hash (#%d)", cxt->tagnum));
@@ -4287,7 +4283,7 @@ static SV *old_retrieve_hash(stcxt_t *cxt, char *cname)
I32 size;
I32 i;
HV *hv;
- SV *sv;
+ SV *sv=NULL;
int c;
static SV *sv_h_undef = (SV *) 0; /* hv_store() bug */
diff --git a/gv.c b/gv.c
index b0380318c0..c0f0d93f80 100644
--- a/gv.c
+++ b/gv.c
@@ -1360,7 +1360,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
AMT *amtp=NULL, *oamtp=NULL;
int fl=0, off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
int postpr = 0, force_cpy = 0, assignshift = assign ? 1 : 0;
- HV* stash;
+ HV* stash=NULL;
if (!(AMGf_noleft & flags) && SvAMAGIC(left)
&& (mg = mg_find((SV*)(stash=SvSTASH(SvRV(left))),
PERL_MAGIC_overload_table))
diff --git a/perl.c b/perl.c
index d3c8a953bd..9920a0f857 100644
--- a/perl.c
+++ b/perl.c
@@ -1681,7 +1681,7 @@ Perl_call_sv(pTHX_ SV *sv, I32 flags)
LOGOP myop; /* fake syntax tree node */
UNOP method_op;
I32 oldmark;
- I32 retval = 0;
+ volatile I32 retval = 0;
I32 oldscope;
bool oldcatch = CATCH_GET;
int ret;
@@ -1869,7 +1869,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
dSP;
UNOP myop; /* fake syntax tree node */
I32 oldmark = SP - PL_stack_base;
- I32 retval = 0;
+ volatile I32 retval = 0;
I32 oldscope;
int ret;
OP* oldop = PL_op;