mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 22:06:07 +00:00
vim-patch:8.1.1085: compiler warning for possibly uninitialized variable
Problem: Compiler warning for possibly uninitialized variable. (Tony
Mechelynck)
Solution: Make conditions more logical.
bd9bf266fc
This commit is contained in:
@@ -320,22 +320,22 @@ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, int next_c)
|
|||||||
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 = (int)curr_a->medial;
|
if (forward_combine) {
|
||||||
}
|
curr_c = (int)curr_a->medial;
|
||||||
if (backward_combine && !forward_combine) {
|
} else {
|
||||||
curr_c = (int)curr_a->final;
|
curr_c = (int)curr_a->final;
|
||||||
}
|
}
|
||||||
if (!backward_combine && forward_combine) {
|
} else {
|
||||||
curr_c = (int)curr_a->initial;
|
if (forward_combine) {
|
||||||
}
|
curr_c = (int)curr_a->initial;
|
||||||
if (!backward_combine && !forward_combine) {
|
} else {
|
||||||
curr_c = (int)curr_a->isolated;
|
curr_c = (int)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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user