# HG changeset patch # User Christian Brabandt # Date 1697624104 -7200 # Node ID 129f04151d7595efad32fa6f3c36457ca29ee55b # Parent 3f6b751cca642bd658ce751c15420795e2e88828 patch 9.0.2048: python: uninitialized warning Commit: https://github.com/vim/vim/commit/982ef16059bd163a77271107020defde0740bbd6 Author: Ken Takata Date: Wed Oct 18 12:02:24 2023 +0200 patch 9.0.2048: python: uninitialized warning Problem: python: uninitialized warning Solution: initialize 'minor' always win32,py3: Fix uninitialized warning Fix the following warning: ``` if_python3.c: In function 'py3_get_system_libname': if_python3.c:879:16: warning: 'minor' may be used uninitialized [-Wmaybe-uninitialized] 879 | if (minor == PY_MINOR_VERSION) | ^ if_python3.c:839:24: note: 'minor' was declared here 839 | long major, minor; | ^~~~~ ``` closes: #13368 Signed-off-by: Christian Brabandt Co-authored-by: Ken Takata diff --git a/src/if_python3.c b/src/if_python3.c --- a/src/if_python3.c +++ b/src/if_python3.c @@ -848,8 +848,9 @@ py3_get_system_libname(const char *libna break; major = wcstol(keyname, &wp, 10); - if (*wp == L'.') - minor = wcstol(wp + 1, &wp, 10); + if (*wp != L'.') + continue; + minor = wcstol(wp + 1, &wp, 10); # ifdef _WIN64 if (*wp != L'\0') continue; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2048, +/**/ 2047, /**/ 2046,