mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 03:58:32 +00:00
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.
This commit is contained in:
@@ -3477,7 +3477,6 @@ win_line (
|
|||||||
n_extra = tab_len;
|
n_extra = tab_len;
|
||||||
} else {
|
} else {
|
||||||
char_u *p;
|
char_u *p;
|
||||||
int len = n_extra;
|
|
||||||
int i;
|
int i;
|
||||||
int saved_nextra = n_extra;
|
int saved_nextra = n_extra;
|
||||||
|
|
||||||
@@ -3488,7 +3487,7 @@ win_line (
|
|||||||
|
|
||||||
/* if n_extra > 0, it gives the number of chars to use for
|
/* 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 */
|
* 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) {
|
if (n_extra > 0) {
|
||||||
len += n_extra - tab_len;
|
len += n_extra - tab_len;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user