summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-06-25 15:44:49 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-06-25 18:46:29 -0400
commite8549682cae3ba0c19d1ce8349cc67339f6eea0a (patch)
treed346a1d55a41503269ada3206c66051ca35fec8b /toke.c
parent35ab5b73507b011d1454c717c9308c8fedcdaee4 (diff)
downloadperl-e8549682cae3ba0c19d1ce8349cc67339f6eea0a.tar.gz
Follow-up to 51f14a05: not ignoring my_snprintf return values.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index c9f7e92382..68f7f52f89 100644
--- a/toke.c
+++ b/toke.c
@@ -3357,10 +3357,11 @@ S_scan_const(pTHX_ char *start)
d += 5;
while (str < str_end) {
char hex_string[4];
- PERL_UNUSED_RESULT(
+ int len =
my_snprintf(hex_string,
sizeof(hex_string),
- "%02X.", (U8) *str));
+ "%02X.", (U8) *str);
+ PERL_MY_SNPRINTF_POST_GUARD(len, sizeof(hex_string));
Copy(hex_string, d, 3, char);
d += 3;
str++;
@@ -7407,8 +7408,10 @@ Perl_yylex(pTHX)
PL_in_my_stash = find_in_my_stash(PL_tokenbuf, len);
if (!PL_in_my_stash) {
char tmpbuf[1024];
+ int len;
PL_bufptr = s;
- PERL_UNUSED_RESULT(my_snprintf(tmpbuf, sizeof(tmpbuf), "No such class %.1000s", PL_tokenbuf));
+ len = my_snprintf(tmpbuf, sizeof(tmpbuf), "No such class %.1000s", PL_tokenbuf);
+ PERL_MY_SNPRINTF_POST_GUARD(len, sizeof(tmpbuf));
yyerror_pv(tmpbuf, UTF ? SVf_UTF8 : 0);
}
}