updated for version 7.2.333
Problem: Warnings from static code analysis.
Solution: Small changes to various lines. (Dominique Pelle)
diff --git a/src/fileio.c b/src/fileio.c
index bdc7439..0e2d1cc 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7072,8 +7072,8 @@
*/
for (i = 0; i < (int)(sizeof(tempdirs) / sizeof(char *)); ++i)
{
- size_t itmplen;
# ifndef HAVE_MKDTEMP
+ size_t itmplen;
long nr;
long off;
# endif
@@ -7091,7 +7091,6 @@
else
# endif
add_pathsep(itmp);
- itmplen = STRLEN(itmp);
# ifdef HAVE_MKDTEMP
/* Leave room for filename */
@@ -7104,6 +7103,7 @@
* otherwise it doesn't matter. The use of mkdir() avoids any
* security problems because of the predictable number. */
nr = (mch_get_pid() + (long)time(NULL)) % 1000000L;
+ itmplen = STRLEN(itmp);
/* Try up to 10000 different values until we find a name that
* doesn't exist. */