summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-02-18 03:06:35 +0100
committerYves Orton <demerphq@gmail.com>2023-02-19 09:42:04 +0800
commit6dc20c079fd2534c3c46b72016af032eb0fd0824 (patch)
treeb59f82d443a889a9ed2428ae5475d08b599b0ce5 /toke.c
parent3f66aba00b176ea345e786583e448f0811273af6 (diff)
downloadperl-6dc20c079fd2534c3c46b72016af032eb0fd0824.tar.gz
toke.c - silence maybe-uninitialized warning on gcc 12
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
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
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++) {