aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-11-14 09:51:43 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-15 13:57:11 +0100
commit150b0d66e11dc69b1a4fc3daad3016fa74bee4d9 (patch)
treeca6faf2bbc85d9098b6663d2d236ca761175cb2f
parent4a8af9cc99cd97032d85819601dc44d6de852c1d (diff)
downloadrneovim-150b0d66e11dc69b1a4fc3daad3016fa74bee4d9.tar.gz
rneovim-150b0d66e11dc69b1a4fc3daad3016fa74bee4d9.tar.bz2
rneovim-150b0d66e11dc69b1a4fc3daad3016fa74bee4d9.zip
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.
-rw-r--r--src/nvim/charset.c4
1 files changed, 1 insertions, 3 deletions
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;
}
}