clang/"dead assignments" #10620

Also revert possibly-wrong change in f_sign_getplaced() from
652be3cb00.
This commit is contained in:
Bartosz Miera 2019-07-29 00:52:24 +02:00 committed by Justin M. Keyes
parent 7cc2b723d4
commit 16727dcf1e
6 changed files with 12 additions and 8 deletions

View File

@ -3110,6 +3110,7 @@ void get_complete_info(list_T *what_list, dict_T *retdict)
? compl_curr_match->cp_number - 1 : -1);
}
(void)ret;
// TODO(vim):
// if (ret == OK && (what_flag & CI_WHAT_INSERTED))
}

View File

@ -16032,10 +16032,12 @@ static void f_sign_getplaced(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
if ((di = tv_dict_find(dict, "lnum", -1)) != NULL) {
// get signs placed at this line
lnum = tv_get_lnum(&di->di_tv);
if (lnum <= 0) {
lnum = (linenr_T)tv_get_number_chk(&di->di_tv, &notanum);
if (notanum) {
return;
}
(void)lnum;
lnum = tv_get_lnum(&di->di_tv);
}
if ((di = tv_dict_find(dict, "id", -1)) != NULL) {
// get sign placed with this identifier
@ -16164,6 +16166,7 @@ static void f_sign_place(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (notanum) {
goto cleanup;
}
(void)lnum;
lnum = tv_get_lnum(&di->di_tv);
}
if ((di = tv_dict_find(dict, "priority", -1)) != NULL) {

View File

@ -3508,7 +3508,9 @@ static char_u *set_chars_option(win_T *wp, char_u **varp)
{
int round, i, len, entries;
char_u *p, *s;
int c1 = 0, c2 = 0, c3 = 0;
int c1;
int c2 = 0;
int c3 = 0;
struct chars_tab {
int *cp; ///< char value
@ -3575,7 +3577,7 @@ static char_u *set_chars_option(win_T *wp, char_u **varp)
if (STRNCMP(p, tab[i].name, len) == 0
&& p[len] == ':'
&& p[len + 1] != NUL) {
c1 = c2 = c3 = 0;
c2 = c3 = 0;
s = p + len + 1;
// TODO(bfredl): use schar_T representation and utfc_ptr2len

View File

@ -2056,7 +2056,7 @@ static int qf_jump_to_usable_window(int qf_fnum, int *opened_window)
win_T *usable_win_ptr = NULL;
int usable_win;
int flags;
win_T *win = NULL;
win_T *win;
win_T *altwin;
usable_win = 0;
@ -2079,7 +2079,6 @@ static int qf_jump_to_usable_window(int qf_fnum, int *opened_window)
// Locate a window showing a normal buffer
FOR_ALL_WINDOWS_IN_TAB(win2, curtab) {
if (win2->w_buffer->b_p_bt[0] == NUL) {
win = win2;
usable_win = 1;
break;
}

View File

@ -3143,7 +3143,6 @@ win_line (
c = '>';
mb_c = c;
mb_l = 1;
mb_utf8 = false;
multi_attr = win_hl_attr(wp, HLF_AT);
// put the pointer back to output the double-width

View File

@ -2330,7 +2330,7 @@ viml_pexpr_parse_invalid_comma:
break;
} else if (eastnode_type == kExprNodeSubscript) {
is_subscript = true;
can_be_ternary = false;
// can_be_ternary = false;
assert(!is_ternary);
break;
} else if (eastnode_type == kExprNodeColon) {