mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 9.0.0376: clang warns for dead assignments
Problem: Clang warns for dead assignments. Solution: Adjust the code. (Yegappan Lakshmanan, closes #11048)
This commit is contained in:
committed by
Bram Moolenaar
parent
c8ac3a072f
commit
6b085b9d73
@@ -3121,8 +3121,10 @@ get_complete_info(list_T *what_list, dict_T *retdict)
|
|||||||
? compl_curr_match->cp_number - 1 : -1);
|
? compl_curr_match->cp_number - 1 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
if (ret == OK && (what_flag & CI_WHAT_INSERTED))
|
||||||
// if (ret == OK && (what_flag & CI_WHAT_INSERTED))
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -1344,7 +1344,6 @@ op_tilde(oparg_T *oap)
|
|||||||
pos.col = 0;
|
pos.col = 0;
|
||||||
pos.lnum++;
|
pos.lnum++;
|
||||||
}
|
}
|
||||||
ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
|
|
||||||
count = oap->end.col - pos.col + 1;
|
count = oap->end.col - pos.col + 1;
|
||||||
netbeans_removed(curbuf, pos.lnum, pos.col, (long)count);
|
netbeans_removed(curbuf, pos.lnum, pos.col, (long)count);
|
||||||
// get the line again, it may have been flushed
|
// get the line again, it may have been flushed
|
||||||
|
@@ -4522,7 +4522,7 @@ mch_call_shell_terminal(
|
|||||||
// restore curwin/curbuf and a few other things
|
// restore curwin/curbuf and a few other things
|
||||||
aucmd_restbuf(&aco);
|
aucmd_restbuf(&aco);
|
||||||
|
|
||||||
// only require pressing Enter when redrawing, to avoid that system() gets
|
// Only require pressing Enter when redrawing, to avoid that system() gets
|
||||||
// the hit-enter prompt even though it didn't output anything.
|
// the hit-enter prompt even though it didn't output anything.
|
||||||
if (!RedrawingDisabled)
|
if (!RedrawingDisabled)
|
||||||
wait_return(TRUE);
|
wait_return(TRUE);
|
||||||
@@ -5021,7 +5021,6 @@ mch_call_shell_fork(
|
|||||||
{
|
{
|
||||||
// finished all the lines, close pipe
|
// finished all the lines, close pipe
|
||||||
close(toshell_fd);
|
close(toshell_fd);
|
||||||
toshell_fd = -1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lp = ml_get(lnum);
|
lp = ml_get(lnum);
|
||||||
@@ -5399,7 +5398,7 @@ finished:
|
|||||||
* child already exited.
|
* child already exited.
|
||||||
*/
|
*/
|
||||||
if (wait_pid != pid)
|
if (wait_pid != pid)
|
||||||
wait_pid = wait4pid(pid, &status);
|
(void)wait4pid(pid, &status);
|
||||||
|
|
||||||
# ifdef FEAT_GUI
|
# ifdef FEAT_GUI
|
||||||
// Close slave side of pty. Only do this after the child has
|
// Close slave side of pty. Only do this after the child has
|
||||||
@@ -6495,7 +6494,7 @@ select_eintr:
|
|||||||
#ifdef FEAT_JOB_CHANNEL
|
#ifdef FEAT_JOB_CHANNEL
|
||||||
// also call when ret == 0, we may be polling a keep-open channel
|
// also call when ret == 0, we may be polling a keep-open channel
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
ret = channel_select_check(ret, &rfds, &wfds);
|
(void)channel_select_check(ret, &rfds, &wfds);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // HAVE_SELECT
|
#endif // HAVE_SELECT
|
||||||
|
@@ -312,8 +312,6 @@ get_function_args(
|
|||||||
// find the end of the expression (doesn't evaluate it)
|
// find the end of the expression (doesn't evaluate it)
|
||||||
any_default = TRUE;
|
any_default = TRUE;
|
||||||
p = skipwhite(p) + 1;
|
p = skipwhite(p) + 1;
|
||||||
whitep = p;
|
|
||||||
p = skipwhite(p);
|
|
||||||
expr = p;
|
expr = p;
|
||||||
if (eval1(&p, &rettv, NULL) != FAIL)
|
if (eval1(&p, &rettv, NULL) != FAIL)
|
||||||
{
|
{
|
||||||
|
@@ -703,6 +703,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
376,
|
||||||
/**/
|
/**/
|
||||||
375,
|
375,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -514,10 +514,8 @@ generate_2BOOL(cctx_T *cctx, int invert, int offset)
|
|||||||
int
|
int
|
||||||
generate_COND2BOOL(cctx_T *cctx)
|
generate_COND2BOOL(cctx_T *cctx)
|
||||||
{
|
{
|
||||||
isn_T *isn;
|
|
||||||
|
|
||||||
RETURN_OK_IF_SKIP(cctx);
|
RETURN_OK_IF_SKIP(cctx);
|
||||||
if ((isn = generate_instr(cctx, ISN_COND2BOOL)) == NULL)
|
if (generate_instr(cctx, ISN_COND2BOOL) == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
|
||||||
// type becomes bool
|
// type becomes bool
|
||||||
@@ -741,13 +739,9 @@ generate_PUSHS(cctx_T *cctx, char_u **str)
|
|||||||
int
|
int
|
||||||
generate_PUSHCHANNEL(cctx_T *cctx)
|
generate_PUSHCHANNEL(cctx_T *cctx)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_JOB_CHANNEL
|
|
||||||
isn_T *isn;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RETURN_OK_IF_SKIP(cctx);
|
RETURN_OK_IF_SKIP(cctx);
|
||||||
#ifdef FEAT_JOB_CHANNEL
|
#ifdef FEAT_JOB_CHANNEL
|
||||||
if ((isn = generate_instr_type(cctx, ISN_PUSHCHANNEL, &t_channel)) == NULL)
|
if (generate_instr_type(cctx, ISN_PUSHCHANNEL, &t_channel) == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
#else
|
||||||
@@ -762,13 +756,9 @@ generate_PUSHCHANNEL(cctx_T *cctx)
|
|||||||
int
|
int
|
||||||
generate_PUSHJOB(cctx_T *cctx)
|
generate_PUSHJOB(cctx_T *cctx)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_JOB_CHANNEL
|
|
||||||
isn_T *isn;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RETURN_OK_IF_SKIP(cctx);
|
RETURN_OK_IF_SKIP(cctx);
|
||||||
#ifdef FEAT_JOB_CHANNEL
|
#ifdef FEAT_JOB_CHANNEL
|
||||||
if ((isn = generate_instr_type(cctx, ISN_PUSHJOB, &t_job)) == NULL)
|
if (generate_instr_type(cctx, ISN_PUSHJOB, &t_job) == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
#else
|
||||||
@@ -1067,10 +1057,8 @@ generate_UNLET(cctx_T *cctx, isntype_T isn_type, char_u *name, int forceit)
|
|||||||
int
|
int
|
||||||
generate_LOCKCONST(cctx_T *cctx)
|
generate_LOCKCONST(cctx_T *cctx)
|
||||||
{
|
{
|
||||||
isn_T *isn;
|
|
||||||
|
|
||||||
RETURN_OK_IF_SKIP(cctx);
|
RETURN_OK_IF_SKIP(cctx);
|
||||||
if ((isn = generate_instr(cctx, ISN_LOCKCONST)) == NULL)
|
if (generate_instr(cctx, ISN_LOCKCONST) == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@@ -2324,7 +2324,7 @@ copy_viminfo_marks(
|
|||||||
// Read the next line. If it has the "*" mark compare the
|
// Read the next line. If it has the "*" mark compare the
|
||||||
// time stamps. Write entries from "buflist" that are
|
// time stamps. Write entries from "buflist" that are
|
||||||
// newer.
|
// newer.
|
||||||
if (!(eof = viminfo_readline(virp)) && line[0] == TAB)
|
if (!viminfo_readline(virp) && line[0] == TAB)
|
||||||
{
|
{
|
||||||
did_read_line = TRUE;
|
did_read_line = TRUE;
|
||||||
if (line[1] == '*')
|
if (line[1] == '*')
|
||||||
|
@@ -782,7 +782,6 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
p = 0;
|
p = 0;
|
||||||
c = 0;
|
|
||||||
while ((length < 0 || p < length) && (c = getc_or_die(fp)) != EOF)
|
while ((length < 0 || p < length) && (c = getc_or_die(fp)) != EOF)
|
||||||
{
|
{
|
||||||
FPRINTF_OR_DIE((fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",
|
FPRINTF_OR_DIE((fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",
|
||||||
|
Reference in New Issue
Block a user