0
0
mirror of https://github.com/vim/vim.git synced 2025-10-23 08:44:20 -04:00

patch 9.1.1641: a few compiler warnings are output

Problem:  a few compiler warnings are output
Solution: Fix compiler warnings (Yegappan Lakshmanan)

closes: #18025

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2025-08-17 21:02:44 +02:00
committed by Christian Brabandt
parent c08b94b072
commit 486cffab3e
4 changed files with 7 additions and 4 deletions

View File

@@ -2174,7 +2174,7 @@ init_homedir(void)
if (homedrive != NULL
&& strlen(homedrive) + strlen(homepath) < sizeof(buf))
{
sprintf(buf, "%s%s", homedrive, homepath);
snprintf(buf, sizeof(buf), "%s%s", homedrive, homepath);
if (buf[0] != NUL)
var = buf;
}
@@ -2202,7 +2202,7 @@ init_homedir(void)
if (exp != NULL && *exp != NUL
&& strlen(exp) + strlen(p) < sizeof(buf))
{
sprintf(buf, "%s%s", exp, p + 1);
snprintf(buf, sizeof(buf), "%s%s", exp, p + 1);
var = buf;
}
}