Skip to content

Commit f20c1fe

Browse files
committed
Fix -Werror failure in Spoofchecker::areConfusable
1 parent 4bc84a5 commit f20c1fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/intl/spoofchecker/spoofchecker_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ PHP_METHOD(Spoofchecker, areConfusable)
7878
SPOOFCHECKER_METHOD_FETCH_OBJECT;
7979
if(s1_len > INT32_MAX || s2_len > INT32_MAX) {
8080
SPOOFCHECKER_ERROR_CODE(co) = U_BUFFER_OVERFLOW_ERROR;
81+
/* Work around compiler uninitialised warning, which breaks -Werror builds */
82+
ret = 1;
8183
} else {
8284
ret = uspoof_areConfusableUTF8(co->uspoof, s1, (int32_t)s1_len, s2, (int32_t)s2_len, SPOOFCHECKER_ERROR_CODE_P(co));
8385
}

0 commit comments

Comments
 (0)