mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
PVS/V1028: cast operands, not the result #10502
This commit is contained in:
parent
8a3f8589a3
commit
6316247da3
@ -1471,7 +1471,8 @@ int op_delete(oparg_T *oap)
|
||||
// copy up to deleted part
|
||||
memmove(newp, oldp, (size_t)bd.textcol);
|
||||
// insert spaces
|
||||
memset(newp + bd.textcol, ' ', (size_t)(bd.startspaces + bd.endspaces));
|
||||
memset(newp + bd.textcol, ' ', (size_t)bd.startspaces +
|
||||
(size_t)bd.endspaces);
|
||||
// copy the part after the deleted part
|
||||
oldp += bd.textcol + bd.textlen;
|
||||
STRMOVE(newp + bd.textcol + bd.startspaces + bd.endspaces, oldp);
|
||||
@ -1743,7 +1744,7 @@ int op_replace(oparg_T *oap, int c)
|
||||
oldp = get_cursor_line_ptr();
|
||||
oldlen = (int)STRLEN(oldp);
|
||||
|
||||
size_t newp_size = (size_t)(bd.textcol + bd.startspaces);
|
||||
size_t newp_size = (size_t)bd.textcol + (size_t)bd.startspaces;
|
||||
if (had_ctrl_v_cr || (c != '\r' && c != '\n')) {
|
||||
newp_size += (size_t)numc;
|
||||
if (!bd.is_short) {
|
||||
|
Loading…
Reference in New Issue
Block a user