To: vim_dev@googlegroups.com Subject: Patch 8.1.1085 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1085 Problem: Compiler warning for possibly uninitialized variable. (Tony Mechelynck) Solution: Make conditions more logical. Files: src/arabic.c *** ../vim-8.1.1084/src/arabic.c 2019-03-22 16:33:03.483016118 +0100 --- src/arabic.c 2019-03-30 18:22:15.920979930 +0100 *************** *** 363,380 **** 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; } ! // Sanity check -- curr_c should, in the future, never be 0. ! // We should, in the future, insert a fatal error here. if (curr_c == NUL) curr_c = c; --- 363,385 ---- int backward_combine = !prev_laa && can_join(prev_c, c); int forward_combine = can_join(c, next_c); ! 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; ! } } ! // Character missing from the table means using original character. if (curr_c == NUL) curr_c = c; *** ../vim-8.1.1084/src/version.c 2019-03-30 18:10:57.653082357 +0100 --- src/version.c 2019-03-30 18:18:29.270361252 +0100 *************** *** 777,778 **** --- 777,780 ---- { /* Add new patch number below this line */ + /**/ + 1085, /**/ -- If you feel lonely, try schizophrenia. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///