PVS/V1028: cast operands, not the result #10505

This commit is contained in:
Ihor Antonov 2019-07-16 14:03:08 -04:00 committed by Justin M. Keyes
parent 1eea2d236f
commit f31f2d0b22

View File

@ -2606,8 +2606,9 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
static void yank_copy_line(yankreg_T *reg, struct block_def *bd, size_t y_idx)
{
char_u *pnew = xmallocz((size_t)(bd->startspaces + bd->endspaces
+ bd->textlen));
int size = bd->startspaces + bd->endspaces + bd->textlen;
assert(size >= 0);
char_u *pnew = xmallocz((size_t)size);
reg->y_array[y_idx] = pnew;
memset(pnew, ' ', (size_t)bd->startspaces);
pnew += bd->startspaces;