summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-10-05 22:13:35 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:18 -0700
commitf1c07be4129bd6df320f25e77520c9725c21b9ba (patch)
treeb86891995ed07c93fc99de0cd88b6b9922fcfe09 /gv.c
parent7833c8a6c843957351c2d3abf519e98cf2f5feab (diff)
downloadperl-f1c07be4129bd6df320f25e77520c9725c21b9ba.tar.gz
gv.c: Use name_end to avoid compiler warning
In this code path, name_cursor could be uninitialised if gv_fetchpvn_flags is called with GV_NOTQUAL|GV_ADDWARN. Whenever it is initialised, it is the same as name_end by the time this part of the function is reached.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 550b258389..f4b4b2a96b 100644
--- a/gv.c
+++ b/gv.c
@@ -1643,7 +1643,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
if (add & GV_ADDWARN)
Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL), "Had to create %"SVf" unexpectedly",
- SVfARG(newSVpvn_flags(nambeg, name_cursor-nambeg, SVs_TEMP | is_utf8 )));
+ SVfARG(newSVpvn_flags(nambeg, name_end-nambeg, SVs_TEMP | is_utf8 )));
gv_init_pvn(gv, stash, name, len, (add & GV_ADDMULTI)|is_utf8);
if ( isIDFIRST_lazy_if(name, is_utf8)