From 6dc20c079fd2534c3c46b72016af032eb0fd0824 Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Sat, 18 Feb 2023 03:06:35 +0100 Subject: toke.c - silence maybe-uninitialized warning on gcc 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This silences the following (bogus) warning: toke.c:12104:24: warning: ‘b’ may be used uninitialized [-Wmaybe-uninitialized] It won't be used unitialized, but there is no reason not to initialize it to shut up the warning on gcc-12 Fixes Github Issue #20816 --- toke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toke.c') diff --git a/toke.c b/toke.c index 70d2331913..a4454fe010 100644 --- a/toke.c +++ b/toke.c @@ -12101,7 +12101,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) NV nv_mult = 1.0; #endif bool accumulate = TRUE; - U8 b; + U8 b = 0; /* silence compiler warning */ int lim = 1 << shift; for (h++; ((isXDIGIT(*h) && (b = XDIGIT_VALUE(*h)) < lim) || *h == '_'); h++) { -- cgit v1.2.1