The variable `already_checked` in Perl_init_i18nl10n() never become
negative, and never exceed `C_trial` which is a small positive integer.
Thus `unsigned int` should be enough.
This fixes build warning on 32-bit target
(where sizeof(unsigned int) == sizeof(SSize_t)):
locale.c: In function ‘Perl_init_i18nl10n’:
locale.c:7370:40: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘ssize_t’ {aka ‘int’} [-Wsign-compare]
7370 | for (unsigned int i = 0; i < already_checked; i++) {
| ^
} trials;
trials trial;
- SSize_t already_checked = 0;
+ unsigned int already_checked = 0;
const char * checked[C_trial];
# ifdef LC_ALL
}
/* And, for future iterations, indicate we've tried this locale */
+ assert(already_checked < C_ARRAY_LENGTH(checked));
checked[already_checked] = savepv(locale);
SAVEFREEPV(checked[already_checked]);
already_checked++;