From a505da20f7d1f12a5cf0addacca9f2e7c3a2c168 Mon Sep 17 00:00:00 2001 From: Alessio Igor Bogani Date: Wed, 14 Apr 2010 20:17:01 +0200 Subject: [PATCH] misc: Fix warning replacing %d with %zu for size_t Warning fixes. Signed-off-by: Alessio Igor Bogani Signed-off-by: Michel Pollet --- examples/parts/uart_udp.c | 2 +- simavr/sim/sim_elf.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/parts/uart_udp.c b/examples/parts/uart_udp.c index 468d9c7..c08dedb 100644 --- a/examples/parts/uart_udp.c +++ b/examples/parts/uart_udp.c @@ -106,7 +106,7 @@ static void * uart_udp_thread(void * param) while (r-- && !uart_udp_fifo_isfull(&p->out)) uart_udp_fifo_write(&p->out, *src++); if (r > 0) - printf("UDP dropped %d bytes\n", r); + printf("UDP dropped %zu bytes\n", r); } if (FD_ISSET(p->s, &write_set)) { uint8_t buffer[512]; diff --git a/simavr/sim/sim_elf.c b/simavr/sim/sim_elf.c index 6cfa3c4..8c17f00 100644 --- a/simavr/sim/sim_elf.c +++ b/simavr/sim/sim_elf.c @@ -272,12 +272,12 @@ int elf_read_firmware(const char * file, elf_firmware_t * firmware) // hdump("code", data_text->d_buf, data_text->d_size); memcpy(firmware->flash + offset, data_text->d_buf, data_text->d_size); offset += data_text->d_size; - printf("Loaded %d .text\n", data_text->d_size); + printf("Loaded %zu .text\n", data_text->d_size); } if (data_data) { // hdump("data", data_data->d_buf, data_data->d_size); memcpy(firmware->flash + offset, data_data->d_buf, data_data->d_size); - printf("Loaded %d .data\n", data_data->d_size); + printf("Loaded %zu .data\n", data_data->d_size); offset += data_data->d_size; firmware->datasize = data_data->d_size; } @@ -285,7 +285,7 @@ int elf_read_firmware(const char * file, elf_firmware_t * firmware) // hdump("eeprom", data_ee->d_buf, data_ee->d_size); firmware->eeprom = malloc(data_ee->d_size); memcpy(firmware->eeprom, data_ee->d_buf, data_ee->d_size); - printf("Loaded %d .eeprom\n", data_ee->d_size); + printf("Loaded %zu .eeprom\n", data_ee->d_size); firmware->eesize = data_ee->d_size; } // hdump("flash", avr->flash, offset); -- 2.39.5