0
0
mirror of https://github.com/vim/vim.git synced 2025-10-21 08:24:06 -04:00

patch 9.1.1724: Compiler warning about ununitialized variable in ex_docmd.

Problem:  Compiler warning about ununitialized variable in ex_docmd.
Solution: Initialize result variable (mityu)

Silence uninitialized variable warning produced by clang 21.1.0

closes: #18182

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
mityu
2025-09-01 19:18:46 +02:00
committed by Christian Brabandt
parent 710095cab8
commit 5f5a1c5876
2 changed files with 3 additions and 5 deletions

View File

@@ -9773,7 +9773,7 @@ eval_vars(
{
int i;
char_u *s;
char_u *result;
char_u *result = (char_u *)"";
char_u *resultbuf = NULL;
size_t resultlen;
buf_T *buf;
@@ -10064,10 +10064,6 @@ eval_vars(
#endif
break;
#endif
default:
result = (char_u *)""; // avoid gcc warning
break;
}
resultlen = STRLEN(result); // length of new string

View File

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