# HG changeset patch # User Bram Moolenaar # Date 1374666562 -7200 # Node ID 1261caf9bc5193d304140647c08ca5b52120ce52 # Parent 3f65dc9c8840c376ae38e5b5d48688cb5d7a4846 updated for version 7.4a.040 Problem: Win32: using uninitialized variable. Solution: (Yukihiro Nakadaira) diff --git a/src/os_win32.c b/src/os_win32.c --- a/src/os_win32.c +++ b/src/os_win32.c @@ -2717,21 +2717,19 @@ mch_getperm(char_u *name) /* - * set file permission for `name' to `perm' + * Set file permission for "name" to "perm". * - * return FAIL for failure, OK otherwise + * Return FAIL for failure, OK otherwise. */ int -mch_setperm( - char_u *name, - long perm) +mch_setperm(char_u *name, long perm) { - long n; + long n = -1; + #ifdef FEAT_MBYTE - WCHAR *p; if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) { - p = enc_to_utf16(name, NULL); + WCHAR *p = enc_to_utf16(name, NULL); if (p != NULL) { @@ -2742,7 +2740,7 @@ mch_setperm( /* Retry with non-wide function (for Windows 98). */ } } - if (p == NULL) + if (n == -1) #endif n = _chmod(name, perm); if (n == -1) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 40, +/**/ 39, /**/ 38,