gh-84461: Silence some compiler warnings on WASM (GH-93978)

This commit is contained in:
Christian Heimes 2022-06-20 13:34:40 +02:00 committed by GitHub
parent affa9f22cf
commit 774ef28814
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 8 deletions

View file

@ -355,7 +355,7 @@ STRINGLIB(_preprocess)(const STRINGLIB_CHAR *needle, Py_ssize_t len_needle,
}
// Fill up a compressed Boyer-Moore "Bad Character" table
Py_ssize_t not_found_shift = Py_MIN(len_needle, MAX_SHIFT);
for (Py_ssize_t i = 0; i < TABLE_SIZE; i++) {
for (Py_ssize_t i = 0; i < (Py_ssize_t)TABLE_SIZE; i++) {
p->table[i] = Py_SAFE_DOWNCAST(not_found_shift,
Py_ssize_t, SHIFT_TYPE);
}