diff options
author | Yves Orton <demerphq@gmail.com> | 2017-06-01 16:30:34 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2017-06-01 17:17:34 +0200 |
commit | 6f15e0a588173421bf07c4cdcd160bd689f5581b (patch) | |
tree | 08d7386296f6aa433a33031da0079dd88abca459 /hv.c | |
parent | 84610c522ba9c4c14999a7c317050818363d5b7c (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |