fix compiler warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int'

Merges https://github.com/espressif/esp-idf/pull/5687
Equivalent fix to https://github.com/espressif/esp-idf/issues/6120 for v4.0 branch
This commit is contained in:
SiLeader 2020-08-03 20:06:48 +09:00 committed by Angus Gratton
parent 3a56233a4d
commit d7c8dd270f

View File

@ -74,7 +74,7 @@ static inline void cpu_init_memctl()
static inline void cpu_configure_region_protection()
{
const uint32_t pages_to_protect[] = {0x00000000, 0x80000000, 0xa0000000, 0xc0000000, 0xe0000000};
for (int i = 0; i < sizeof(pages_to_protect)/sizeof(pages_to_protect[0]); ++i) {
for (size_t i = 0; i < sizeof(pages_to_protect)/sizeof(pages_to_protect[0]); ++i) {
cpu_write_dtlb(pages_to_protect[i], 0xf);
cpu_write_itlb(pages_to_protect[i], 0xf);
}