aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIhor Antonov <ngortheone@users.noreply.github.com>2019-07-16 05:23:58 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-07-16 11:23:58 +0200
commit6316247da3e7a98c09c858e40e7baf65a78969f2 (patch)
tree900b68234a074dd424eaf53824507b981b9264a5 /src
parent8a3f8589a3eda5d42068fad5f5430f4e648f6f0e (diff)
downloadrneovim-6316247da3e7a98c09c858e40e7baf65a78969f2.tar.gz
rneovim-6316247da3e7a98c09c858e40e7baf65a78969f2.tar.bz2
rneovim-6316247da3e7a98c09c858e40e7baf65a78969f2.zip
PVS/V1028: cast operands, not the result #10502
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index e07e93060a..fa58f7ba12 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -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) {