From: Branko Čibej Date: Thu, 21 Sep 2017 16:27:24 +0000 (+0200) Subject: Fix declaration-after-statement warning when compiling in strict C90 mode. (#113) X-Git-Tag: archive/raspbian/2.11.3-2+rpi1^2~10^2~1^2~127 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3a10df60133644b23d6e73196afdf15f41958da6;p=utf8proc.git Fix declaration-after-statement warning when compiling in strict C90 mode. (#113) --- diff --git a/utf8proc.c b/utf8proc.c index c14bbe1..6961e4b 100644 --- a/utf8proc.c +++ b/utf8proc.c @@ -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) { - int lbc_override = lbc; - if (state && *state != UTF8PROC_BOUNDCLASS_START) - lbc_override = *state; + int lbc_override = ((state && *state != UTF8PROC_BOUNDCLASS_START) + ? *state : lbc); utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc); if (state) { // Special support for GB 12/13 made possible by GB999. After two RI