Commit ffc0e9503cb for php
commit ffc0e9503cb6e7394a37c6c6ba6cc2fdcef35339
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date: Wed Dec 2 15:06:09 2026 +0100
Fix re2c -Wunreachable-rules warnings (GH-25997)
The rules in Zend/zend_ini_scanner.l are removed, the fallback rule in
ext/json/json_scanner.re is converted to <*>*, which suppresses this warning.
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l
index 02ecd60858d..12de96fe13c 100644
--- a/Zend/zend_ini_scanner.l
+++ b/Zend/zend_ini_scanner.l
@@ -637,7 +637,7 @@ end_raw_value_chars:
return TC_QUOTED_STRING;
}
-<ST_SECTION_VALUE,ST_VALUE,ST_OFFSET,ST_VAR_FALLBACK>{WHITESPACE} {
+<ST_VALUE>{WHITESPACE} {
RETURN_TOKEN(TC_WHITESPACE, yytext, yyleng);
}
diff --git a/ext/json/json_scanner.re b/ext/json/json_scanner.re
index a43544cd067..f41bb2b2c3f 100644
--- a/ext/json/json_scanner.re
+++ b/ext/json/json_scanner.re
@@ -401,7 +401,7 @@ std:
}
<STR_P2_UTF>ANY { PHP_JSON_CONDITION_GOTO(STR_P2_UTF); }
- <*>ANY {
+ <*>* {
s->errcode = PHP_JSON_ERROR_SYNTAX;
return PHP_JSON_T_ERROR;
}