summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2017-06-01 16:30:34 +0200
committerYves Orton <demerphq@gmail.com>2017-06-01 17:17:34 +0200
commit6f15e0a588173421bf07c4cdcd160bd689f5581b (patch)
tree08d7386296f6aa433a33031da0079dd88abca459 /hv.c
parent84610c522ba9c4c14999a7c317050818363d5b7c (diff)
downloadperl-6f15e0a588173421bf07c4cdcd160bd689f5581b.tar.gz
hv.c: silence compiler warning
hv.c: In function ‘Perl_hv_undef_flags’: hv.c:2053:35: warning: ‘orig_ix’ may be used uninitialized in this function [-Wmaybe-uninitialized] PL_tmps_stack[orig_ix] = &PL_sv_undef; The warning is bogus, as we only use orig_ix if "save" is true, and if "save" is true we will have initialized orig_ix. However initializing it in the first place avoids any issue
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index 8acf33a4b2..f372728fe2 100644
--- a/hv.c
+++ b/hv.c
@@ -1955,7 +1955,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
{
XPVHV* xhv;
bool save;
- SSize_t orig_ix;
+ SSize_t orig_ix = PL_tmps_ix; /* silence compiler warning about unitialized vars */
if (!hv)
return;