Replace unsigned induction variable with size_t in background_threads_enable

This patch avoids unnecessary vectorizations in clang and missed recognition of memset in gcc. See also https://godbolt.org/z/aoeMsjr4c.
This commit is contained in:
XChy 2024-03-04 14:50:39 +08:00 committed by Qi Wang
parent 373884ab48
commit ed9b00a96b

View file

@ -580,7 +580,7 @@ background_threads_enable(tsd_t *tsd) {
VARIABLE_ARRAY(bool, marked, max_background_threads);
unsigned nmarked;
for (unsigned i = 0; i < max_background_threads; i++) {
for (size_t i = 0; i < max_background_threads; i++) {
marked[i] = false;
}
nmarked = 0;