PVS/V1028: cast operands, not the result

This commit is contained in:
Justin M. Keyes
2019-01-15 22:20:26 +01:00
parent dca0da4e3f
commit ed171f7be2
4 changed files with 46 additions and 39 deletions

View File

@@ -3393,14 +3393,11 @@ void cmdline_paste_str(char_u *s, int literally)
}
}
/*
* Delete characters on the command line, from "from" to the current
* position.
*/
/// Delete characters on the command line, from "from" to the current position.
static void cmdline_del(int from)
{
memmove(ccline.cmdbuff + from, ccline.cmdbuff + ccline.cmdpos,
(size_t)(ccline.cmdlen - ccline.cmdpos + 1));
(size_t)ccline.cmdlen - ccline.cmdpos + 1);
ccline.cmdlen -= ccline.cmdpos - from;
ccline.cmdpos = from;
}
@@ -3661,8 +3658,8 @@ nextwild (
xp->xp_pattern = ccline.cmdbuff + i;
}
memmove(&ccline.cmdbuff[ccline.cmdpos + difflen],
&ccline.cmdbuff[ccline.cmdpos],
(size_t)(ccline.cmdlen - ccline.cmdpos + 1));
&ccline.cmdbuff[ccline.cmdpos],
(size_t)ccline.cmdlen - ccline.cmdpos + 1);
memmove(&ccline.cmdbuff[i], p2, STRLEN(p2));
ccline.cmdlen += difflen;
ccline.cmdpos += difflen;