patch 9.1.1724: Compiler warning about ununitialized variable in ex_docmd.
Commit:
https://github.com/vim/vim/commit/5f5a1c58768ca67d98eaf1a4fc6a0744e2fb4656
Author: mityu <[email protected]>
Date: Mon Sep 1 19:18:46 2025 +0200
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 3e48aed79..9d7e58ed9 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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
diff --git a/src/version.c b/src/version.c
index 903c459b9..5603415e6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -724,6 +724,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1724,
/**/
1723,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1ut8M2-00FXi7-2w%40256bit.org.