0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.0.0364: clang static analyzer gives warnings

Problem:    Clang static analyzer gives warnings.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes #11043)
This commit is contained in:
Yegappan Lakshmanan
2022-09-03 10:52:24 +01:00
committed by Bram Moolenaar
parent b18b496997
commit c99e182e1f
8 changed files with 15 additions and 13 deletions

View File

@@ -54,12 +54,11 @@ string2float(
if (skip_quotes && vim_strchr((char_u *)s, '\'') != NULL)
{
char_u buf[100];
char_u *p = buf;
char_u *p;
int quotes = 0;
vim_strncpy(buf, (char_u *)s, 99);
p = buf;
for (;;)
for (p = buf; ; p = skipdigits(p))
{
// remove single quotes between digits, not in the exponent
if (*p == '\'')
@@ -69,7 +68,6 @@ string2float(
}
if (!vim_isdigit(*p))
break;
p = skipdigits(p);
}
s = (char *)buf;
f = strtod(s, &s);