Problem: Clang warns for dead assignments.
Solution: Adjust the code. (Yegappan Lakshmanan, closes #11048)
? 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
+ }
}
/*
pos.col = 0;
pos.lnum++;
}
- ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
count = oap->end.col - pos.col + 1;
netbeans_removed(curbuf, pos.lnum, pos.col, (long)count);
// get the line again, it may have been flushed
// restore curwin/curbuf and a few other things
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.
if (!RedrawingDisabled)
wait_return(TRUE);
{
// finished all the lines, close pipe
close(toshell_fd);
- toshell_fd = -1;
break;
}
lp = ml_get(lnum);
* child already exited.
*/
if (wait_pid != pid)
- wait_pid = wait4pid(pid, &status);
+ (void)wait4pid(pid, &status);
# ifdef FEAT_GUI
// Close slave side of pty. Only do this after the child has
#ifdef FEAT_JOB_CHANNEL
// also call when ret == 0, we may be polling a keep-open channel
if (ret >= 0)
- ret = channel_select_check(ret, &rfds, &wfds);
+ (void)channel_select_check(ret, &rfds, &wfds);
#endif
#endif // HAVE_SELECT
// find the end of the expression (doesn't evaluate it)
any_default = TRUE;
p = skipwhite(p) + 1;
- whitep = p;
- p = skipwhite(p);
expr = p;
if (eval1(&p, &rettv, NULL) != FAIL)
{
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 376,
/**/
375,
/**/
int
generate_COND2BOOL(cctx_T *cctx)
{
- isn_T *isn;
-
RETURN_OK_IF_SKIP(cctx);
- if ((isn = generate_instr(cctx, ISN_COND2BOOL)) == NULL)
+ if (generate_instr(cctx, ISN_COND2BOOL) == NULL)
return FAIL;
// type becomes bool
int
generate_PUSHCHANNEL(cctx_T *cctx)
{
-#ifdef FEAT_JOB_CHANNEL
- isn_T *isn;
-#endif
-
RETURN_OK_IF_SKIP(cctx);
#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 OK;
#else
int
generate_PUSHJOB(cctx_T *cctx)
{
-#ifdef FEAT_JOB_CHANNEL
- isn_T *isn;
-#endif
-
RETURN_OK_IF_SKIP(cctx);
#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 OK;
#else
int
generate_LOCKCONST(cctx_T *cctx)
{
- isn_T *isn;
-
RETURN_OK_IF_SKIP(cctx);
- if ((isn = generate_instr(cctx, ISN_LOCKCONST)) == NULL)
+ if (generate_instr(cctx, ISN_LOCKCONST) == NULL)
return FAIL;
return OK;
}
// Read the next line. If it has the "*" mark compare the
// time stamps. Write entries from "buflist" that are
// newer.
- if (!(eof = viminfo_readline(virp)) && line[0] == TAB)
+ if (!viminfo_readline(virp) && line[0] == TAB)
{
did_read_line = TRUE;
if (line[1] == '*')
}
p = 0;
- c = 0;
while ((length < 0 || p < length) && (c = getc_or_die(fp)) != EOF)
{
FPRINTF_OR_DIE((fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",