From 1eb46675b7f755526f588c495fd4f4409f646a67 Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Tue, 4 Nov 2014 15:41:38 +0100 Subject: Fix warnings: screen.c: win_line(): Dead initialization: HI. Problem: Dead initialization @ 3477. http://neovim.org/doc/reports/clang/report-94b736.html#EndPath Diagnostic: Harmless issue. Rationale : `len` is assigned a new value just some lines below. So, this just seems something due to old-style variable declarations. Resolution: We could just remove initialization, but prefer moving declaration down to point of initialization. --- src/nvim/screen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 450ea5e3f1..7fd44d80f0 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3477,7 +3477,6 @@ win_line ( n_extra = tab_len; } else { char_u *p; - int len = n_extra; int i; int saved_nextra = n_extra; @@ -3488,7 +3487,7 @@ win_line ( /* if n_extra > 0, it gives the number of chars to use for * a tab, else we need to calculate the width for a tab */ - len = (tab_len * mb_char2len(lcs_tab2)); + int len = (tab_len * mb_char2len(lcs_tab2)); if (n_extra > 0) { len += n_extra - tab_len; } -- cgit