0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2828: Coverity complains about not checking rename() return value

Problem:    Coverity complains about not checking the rename() return value.
Solution:   Add "(void)", can't do anything in case of a failure.
This commit is contained in:
Bram Moolenaar
2021-05-03 19:49:51 +02:00
parent 5f8ed7408a
commit 97a6c6a1fb
2 changed files with 3 additions and 1 deletions

View File

@@ -3733,7 +3733,7 @@ vim_rename(char_u *from, char_u *to)
return 0;
// Strange, the second step failed. Try moving the
// file back and return failure.
mch_rename(tempname, (char *)from);
(void)mch_rename(tempname, (char *)from);
return -1;
}
// If it fails for one temp name it will most likely fail

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2828,
/**/
2827,
/**/