clang/'Dead store': remove dead code

This commit is contained in:
Jan Edmund Lazo 2019-12-25 06:36:48 -05:00
parent c740e3b4b5
commit 35c3985da6
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
4 changed files with 4 additions and 17 deletions

View File

@ -3249,7 +3249,6 @@ static void extmark_move_regmatch_single(lpos_T startpos,
static void extmark_move_regmatch_multi(ExtmarkSubMulti s, long i)
{
colnr_T mincol;
linenr_T u_lnum;
mincol = s.startpos.col + 1;
linenr_T n_u_lnum = s.lnum + s.endpos.lnum - s.startpos.lnum;
@ -3266,7 +3265,7 @@ static void extmark_move_regmatch_multi(ExtmarkSubMulti s, long i)
// -- Delete Pattern --
// 1. Move marks in the pattern
mincol = s.startpos.col + 1;
u_lnum = n_u_lnum;
linenr_T u_lnum = n_u_lnum;
assert(n_u_lnum == u_lnum);
extmark_copy_and_place(curbuf,
s.lnum, mincol,
@ -3311,7 +3310,6 @@ static void extmark_move_regmatch_multi(ExtmarkSubMulti s, long i)
assert(s.startpos.lnum == 0);
mincol = s.startpos.col + 1;
u_lnum = n_u_lnum;
if (!s.newline_in_pat && s.newline_in_sub) {
// -- Delete Pattern --

View File

@ -479,7 +479,7 @@ win_T *mouse_find_win(int *gridp, int *rowp, int *colp)
static win_T *mouse_find_grid_win(int *gridp, int *rowp, int *colp)
{
if (*gridp == msg_grid.handle) {
rowp += msg_grid_pos;
// rowp += msg_grid_pos; // PVS: dead store #11612
*gridp = DEFAULT_GRID_HANDLE;
} else if (*gridp > 1) {
win_T *wp = get_win_by_grid_handle(*gridp);

View File

@ -1672,17 +1672,6 @@ setmarks:
extmark_col_adjust_delete(curbuf, lnum, mincol, endcol,
kExtmarkUndo, 0);
}
// Delete characters within one line,
// The case with multiple lines is handled by do_join
} else if (oap->motion_type == kMTCharWise && oap->line_count == 1) {
// + 1 to change to buf mode, then plus 1 to fit function requirements
endcol = oap->end.col + 1 + 1;
lnum = curwin->w_cursor.lnum;
if (oap->is_VIsual == false) {
endcol = MAX(endcol - 1, mincol);
}
}
return OK;
}

View File

@ -4513,7 +4513,7 @@ static void qf_get_nth_below_entry(qfline_T *entry,
linenr_T n)
{
while (n-- > 0 && !got_int) {
qfline_T *first_entry = entry;
// qfline_T *first_entry = entry;
int first_errornr = *errornr;
// Treat all the entries on the same line in this file as one
@ -4523,7 +4523,7 @@ static void qf_get_nth_below_entry(qfline_T *entry,
|| entry->qf_next->qf_fnum != entry->qf_fnum) {
// If multiple entries are on the same line, then use the first
// entry
entry = first_entry;
// entry = first_entry;
*errornr = first_errornr;
break;
}