0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.2456: Coverity warning for strcpy() into fixed size array

Problem:    Coverity warning for strcpy() into fixed size array.
Solution:   Add a type cast to hopefully silence the bogus warning.
This commit is contained in:
Bram Moolenaar
2021-02-03 19:31:29 +01:00
parent 2e5910bfbb
commit 7b6903f02c
2 changed files with 5 additions and 1 deletions

View File

@@ -403,7 +403,9 @@ register_closure(ufunc_T *fp)
static void
set_ufunc_name(ufunc_T *fp, char_u *name)
{
STRCPY(fp->uf_name, name);
// Add a type cast to avoid a warning for an overflow, the uf_name[] array
// actually extends beyond the struct.
STRCPY((void *)fp->uf_name, name);
if (name[0] == K_SPECIAL)
{