diff options
author | Ken Takata <kentkt@csc.jp> | 2023-10-18 12:02:24 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-18 12:03:41 +0200 |
commit | 982ef16059bd163a77271107020defde0740bbd6 (patch) | |
tree | 42839f637580b519f8d617b92dacc231be819826 | |
parent | 2b126a6892b485bc9924464fabdf2313e1100aa9 (diff) |
patch 9.0.2048: python: uninitialized warningv9.0.2048
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 <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
-rw-r--r-- | src/if_python3.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index c39f42a6c7..c135e7e6fd 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -848,8 +848,9 @@ py3_get_system_libname(const char *libname) 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 index f839c28159..977bbdf6fe 100644 --- 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, |