[3.13] gh-126433: Fix compiler warnings on 32-bit Windows (#126444) (#126827)

gh-126433: Fix compiler warnings on 32-bit Windows (#126444)

(cherry picked from commit 0b67ce930a)
This commit is contained in:
Victor Stinner 2024-11-14 13:21:27 +01:00 committed by GitHub
parent effedb5ff0
commit bf6fa21a91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 7 deletions

View file

@ -223,7 +223,7 @@ find_home_value(const char *buffer, DWORD maxlen, const char **start, DWORD *len
return 0;
}
for (const char *s = strstr(buffer, "home");
s && ((ptrdiff_t)s - (ptrdiff_t)buffer) < maxlen;
s && (size_t)((ptrdiff_t)s - (ptrdiff_t)buffer) < maxlen;
s = strstr(s + 1, "\nhome")
) {
if (*s == '\n') {