Fix declaration-after-statement warning when compiling in strict C90 mode. (#113)

This commit is contained in:
Branko Čibej 2017-09-21 18:27:24 +02:00 committed by Steven G. Johnson
parent 2a2f97e193
commit 3a10df6013

View File

@ -284,9 +284,8 @@ static utf8proc_bool grapheme_break_simple(int lbc, int tbc) {
static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t *state) static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t *state)
{ {
int lbc_override = lbc; int lbc_override = ((state && *state != UTF8PROC_BOUNDCLASS_START)
if (state && *state != UTF8PROC_BOUNDCLASS_START) ? *state : lbc);
lbc_override = *state;
utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc); utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc);
if (state) { if (state) {
// Special support for GB 12/13 made possible by GB999. After two RI // Special support for GB 12/13 made possible by GB999. After two RI