From e8549682cae3ba0c19d1ce8349cc67339f6eea0a Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 25 Jun 2014 15:44:49 -0400 Subject: Follow-up to 51f14a05: not ignoring my_snprintf return values. --- toke.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'toke.c') 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); } } -- cgit v1.2.1