mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1085: compiler warning for possibly uninitialized variable
Problem: Compiler warning for possibly uninitialized variable. (Tony Mechelynck) Solution: Make conditions more logical.
This commit is contained in:
parent
aff749145e
commit
bd9bf266fc
25
src/arabic.c
25
src/arabic.c
@ -363,18 +363,23 @@ arabic_shape(
|
|||||||
int backward_combine = !prev_laa && can_join(prev_c, c);
|
int backward_combine = !prev_laa && can_join(prev_c, c);
|
||||||
int forward_combine = can_join(c, next_c);
|
int forward_combine = can_join(c, next_c);
|
||||||
|
|
||||||
if (backward_combine && forward_combine)
|
if (backward_combine)
|
||||||
curr_c = curr_a->medial;
|
{
|
||||||
if (backward_combine && !forward_combine)
|
if (forward_combine)
|
||||||
curr_c = curr_a->final;
|
curr_c = curr_a->medial;
|
||||||
if (!backward_combine && forward_combine)
|
else
|
||||||
curr_c = curr_a->initial;
|
curr_c = curr_a->final;
|
||||||
if (!backward_combine && !forward_combine)
|
}
|
||||||
curr_c = curr_a->isolated;
|
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.
|
// Character missing from the table means using original character.
|
||||||
// We should, in the future, insert a fatal error here.
|
|
||||||
if (curr_c == NUL)
|
if (curr_c == NUL)
|
||||||
curr_c = c;
|
curr_c = c;
|
||||||
|
|
||||||
|
@ -775,6 +775,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1085,
|
||||||
/**/
|
/**/
|
||||||
1084,
|
1084,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user