mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-09 19:42:01 +01:00
global: fix sign-compare warnings
This commit is contained in:
@@ -55,7 +55,7 @@ void bootloader_sha256_data(bootloader_sha256_handle_t handle, const void *data,
|
||||
while (REG_READ(SHA_256_BUSY_REG) != 0) { }
|
||||
|
||||
// Copy to memory block
|
||||
for (int i = 0; i < copy_words; i++) {
|
||||
for (size_t i = 0; i < copy_words; i++) {
|
||||
sha_text_reg[block_count + i] = __builtin_bswap32(w[i]);
|
||||
}
|
||||
asm volatile ("memw");
|
||||
@@ -117,7 +117,7 @@ void bootloader_sha256_finish(bootloader_sha256_handle_t handle, uint8_t *digest
|
||||
|
||||
uint32_t *digest_words = (uint32_t *)digest;
|
||||
uint32_t *sha_text_reg = (uint32_t *)(SHA_TEXT_BASE);
|
||||
for (int i = 0; i < DIGEST_WORDS; i++) {
|
||||
for (size_t i = 0; i < DIGEST_WORDS; i++) {
|
||||
digest_words[i] = __builtin_bswap32(sha_text_reg[i]);
|
||||
}
|
||||
asm volatile ("memw");
|
||||
|
||||
@@ -76,7 +76,7 @@ static bool secure_boot_generate(uint32_t image_len){
|
||||
ESP_LOGE(TAG, "bootloader_mmap(0x1000, 0x%x) failed", image_len);
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < image_len; i+= sizeof(digest.iv)) {
|
||||
for (size_t i = 0; i < image_len; i+= sizeof(digest.iv)) {
|
||||
ets_secure_boot_hash(&image[i/sizeof(uint32_t)]);
|
||||
}
|
||||
bootloader_munmap(image);
|
||||
|
||||
Reference in New Issue
Block a user