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

This commit is contained in:
Victor Stinner 2024-11-05 16:05:13 +01:00 committed by GitHub
parent bbfd9c92fa
commit 0b67ce930a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 10 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') {