Skip to content

Commit 26860c6

Browse files
committed
Fix -Wmaybe-uninitialized warning in intl uchar
This variable can indeed be uninitialized when passed to convert_cp, though it will not actually be used if uninitialized. This is still UB though, so let's fix it.
1 parent c757c61 commit 26860c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/intl/uchar/uchar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ IC_INT_METHOD_CHAR(charDigitValue)
583583
IC_METHOD(name) { \
584584
UChar32 cp, ret; \
585585
zend_string *string_codepoint; \
586-
zend_long int_codepoint; \
586+
zend_long int_codepoint = -1; \
587587
ZEND_PARSE_PARAMETERS_START(1, 1) \
588588
Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) \
589589
ZEND_PARSE_PARAMETERS_END(); \

0 commit comments

Comments
 (0)