From 150b0d66e11dc69b1a4fc3daad3016fa74bee4d9 Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Fri, 14 Nov 2014 09:51:43 +0100 Subject: Fix warnings: charset.c: win_lbr_chartabsize(): Dead assignment: HI. Problem : Dead assignment @ 1037. Diagnostic : Harmless issue. Rationale : `tab_corr` is in effect unused after signaled point. Previous code using it after that point was removed at 24ebb018e28187c61900b1616e4f79fec9d70878. Resolution : Remove dead assignment. As only one usage remains, remove variable and inline the only usage. --- src/nvim/charset.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/charset.c b/src/nvim/charset.c index e7ecf05880..f3bb3d8c73 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -978,7 +978,6 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he int mb_added = 0; int numberextra; char_u *ps; - int tab_corr = (*s == TAB); int n; // No 'linebreak', 'showbreak' and 'breakindent': return quickly. @@ -992,7 +991,7 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he // First get normal size, without 'linebreak' int size = win_chartabsize(wp, s, col); int c = *s; - if (tab_corr) { + if (*s == TAB) { col_adj = size - 1; } @@ -1034,7 +1033,6 @@ int win_lbr_chartabsize(win_T *wp, char_u *line, char_u *s, colnr_T col, int *he if (col2 >= colmax) { /* doesn't fit */ size = colmax - col + col_adj; - tab_corr = FALSE; break; } } -- cgit