mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.1032: warnings from clang static analyzer
Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution: Fix relevant warnings.
2c519cf3bf
This commit is contained in:
parent
0e913a0812
commit
26dfeb42dd
@ -719,9 +719,7 @@ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1,
|
||||
// half-shape current and previous character
|
||||
int shape_c = half_shape(prev_c);
|
||||
|
||||
// Save away current character
|
||||
int curr_c = c;
|
||||
|
||||
int curr_c;
|
||||
int curr_laa = A_firstc_laa(c, *c1p);
|
||||
int prev_laa = A_firstc_laa(prev_c, prev_c1);
|
||||
|
||||
|
@ -3810,10 +3810,10 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
|
||||
*/
|
||||
static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
|
||||
{
|
||||
static win_T *wp;
|
||||
static win_T *wp = NULL;
|
||||
|
||||
if (flag == 'w') { // just windows
|
||||
if (buf == curbuf) { // first call for this flag/expansion
|
||||
if (buf == curbuf || wp == NULL) { // first call for this flag/expansion
|
||||
wp = curwin;
|
||||
}
|
||||
assert(wp);
|
||||
|
@ -1652,9 +1652,6 @@ failed:
|
||||
# ifdef HAVE_ICONV
|
||||
if (iconv_fd != (iconv_t)-1) {
|
||||
iconv_close(iconv_fd);
|
||||
# ifndef __clang_analyzer__
|
||||
iconv_fd = (iconv_t)-1;
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
|
||||
|
@ -168,7 +168,7 @@ static const struct nv_cmd {
|
||||
{ NL, nv_down, 0, false },
|
||||
{ Ctrl_K, nv_error, 0, 0 },
|
||||
{ Ctrl_L, nv_clear, 0, 0 },
|
||||
{ Ctrl_M, nv_down, 0, true },
|
||||
{ CAR, nv_down, 0, true },
|
||||
{ Ctrl_N, nv_down, NV_STS, false },
|
||||
{ Ctrl_O, nv_ctrlo, 0, 0 },
|
||||
{ Ctrl_P, nv_up, NV_STS, false },
|
||||
|
@ -4338,6 +4338,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
|
||||
char buf_old[NUMBUFLEN];
|
||||
char buf_new[NUMBUFLEN];
|
||||
char buf_type[7];
|
||||
|
||||
vim_snprintf(buf_old, ARRAY_SIZE(buf_old), "%ld", old_value);
|
||||
vim_snprintf(buf_new, ARRAY_SIZE(buf_new), "%ld", value);
|
||||
vim_snprintf(buf_type, ARRAY_SIZE(buf_type), "%s",
|
||||
|
@ -3883,8 +3883,8 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow,
|
||||
/* check if line ends before left margin */
|
||||
if (vcol < v + col - win_col_off(wp))
|
||||
vcol = v + col - win_col_off(wp);
|
||||
/* Get rid of the boguscols now, we want to draw until the right
|
||||
* edge for 'cursorcolumn'. */
|
||||
// Get rid of the boguscols now, we want to draw until the right
|
||||
// edge for 'cursorcolumn'.
|
||||
col -= boguscols;
|
||||
// boguscols = 0; // Disabled because value never read after this
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user