# HG changeset patch # User Bram Moolenaar # Date 1553967004 -3600 # Node ID 061cf939f7ce93ce6a201ebd86c89c41b1a8dfb0 # Parent a246f204d996d78f98d14f0d38b729639a7a6e37 patch 8.1.1085: compiler warning for possibly uninitialized variable commit https://github.com/vim/vim/commit/bd9bf266fccbf7b7f09e476e09b61f0133e914db Author: Bram Moolenaar Date: Sat Mar 30 18:25:39 2019 +0100 patch 8.1.1085: compiler warning for possibly uninitialized variable Problem: Compiler warning for possibly uninitialized variable. (Tony Mechelynck) Solution: Make conditions more logical. diff --git a/src/arabic.c b/src/arabic.c --- a/src/arabic.c +++ b/src/arabic.c @@ -363,18 +363,23 @@ arabic_shape( int backward_combine = !prev_laa && can_join(prev_c, c); int forward_combine = can_join(c, next_c); - if (backward_combine && forward_combine) - curr_c = curr_a->medial; - if (backward_combine && !forward_combine) - curr_c = curr_a->final; - if (!backward_combine && forward_combine) - curr_c = curr_a->initial; - if (!backward_combine && !forward_combine) - curr_c = curr_a->isolated; + if (backward_combine) + { + if (forward_combine) + curr_c = curr_a->medial; + else + curr_c = curr_a->final; + } + else + { + if (forward_combine) + curr_c = curr_a->initial; + else + curr_c = curr_a->isolated; + } } - // Sanity check -- curr_c should, in the future, never be 0. - // We should, in the future, insert a fatal error here. + // Character missing from the table means using original character. if (curr_c == NUL) curr_c = c; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -776,6 +776,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1085, +/**/ 1084, /**/ 1083,