mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
fixed printf specifiers
This commit is contained in:
parent
6b4d2de74e
commit
ba907471f3
@ -58,7 +58,7 @@ static int test_time(int code)
|
||||
time_value++;
|
||||
|
||||
if (time_value > 10000000) {
|
||||
printf("CC1100 SPI alarm: %u!\n", code);
|
||||
printf("CC1100 SPI alarm: %d!\n", code);
|
||||
time_value = 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ static void download_main(int event)
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "W %d %d\r\n", chip->ram_addr, chip->chunk_size);
|
||||
snprintf(buf, sizeof(buf), "W %u %d\r\n", chip->ram_addr, chip->chunk_size);
|
||||
xmit_cmd(buf, 4);
|
||||
return;
|
||||
|
||||
@ -721,7 +721,7 @@ static void download_main(int event)
|
||||
case XMIT_CKSUM:
|
||||
switch (event) {
|
||||
case BEGIN:
|
||||
snprintf(buf, sizeof(buf), "%d\r\n", cksum);
|
||||
snprintf(buf, sizeof(buf), "%u\r\n", cksum);
|
||||
xmit_cmd(buf, 3);
|
||||
return;
|
||||
|
||||
@ -795,7 +795,7 @@ static void download_main(int event)
|
||||
case BEGIN:
|
||||
printf("write, ");
|
||||
fflush(stdout);
|
||||
snprintf(buf, sizeof(buf), "C %d %d %d\r\n",
|
||||
snprintf(buf, sizeof(buf), "C %d %u %d\r\n",
|
||||
chip->layout[sector].address + sector_offset,
|
||||
chip->ram_addr, chip->chunk_size);
|
||||
xmit_cmd(buf, 5);
|
||||
@ -856,7 +856,7 @@ static void download_main(int event)
|
||||
// bootloader again. Intead, we need to download a tiny ARM
|
||||
// program that reconfigures the hardware and then jumps to zero.
|
||||
//snprintf(buf, sizeof(buf), "G %d A\r\n", 0);
|
||||
snprintf(buf, sizeof(buf), "W %d %d\r\n", chip->ram_addr, chip->bootprog[0] * 4);
|
||||
snprintf(buf, sizeof(buf), "W %u %d\r\n", chip->ram_addr, chip->bootprog[0] * 4);
|
||||
xmit_cmd(buf, 4);
|
||||
return;
|
||||
|
||||
@ -938,7 +938,7 @@ static void download_main(int event)
|
||||
case BOOT_XMIT_CKSUM:
|
||||
switch (event) {
|
||||
case BEGIN:
|
||||
snprintf(buf, sizeof(buf), "%d\r\n", cksum);
|
||||
snprintf(buf, sizeof(buf), "%u\r\n", cksum);
|
||||
//printf("send: %s", buf);
|
||||
xmit_cmd(buf, 3);
|
||||
return;
|
||||
@ -980,7 +980,7 @@ static void download_main(int event)
|
||||
switch (event) {
|
||||
case BEGIN:
|
||||
printf("jumping now!\r\n");
|
||||
snprintf(buf, sizeof(buf), "G %d A\r\n", chip->ram_addr);
|
||||
snprintf(buf, sizeof(buf), "G %u A\r\n", chip->ram_addr);
|
||||
xmit_cmd(buf, 4);
|
||||
return;
|
||||
|
||||
|
@ -57,7 +57,7 @@ static int test_time(int code)
|
||||
time_value++;
|
||||
|
||||
if (time_value > 10000000) {
|
||||
printf("CC1100 SPI alarm: %u!\n", code);
|
||||
printf("CC1100 SPI alarm: %d!\n", code);
|
||||
time_value = 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -78,12 +78,12 @@ void thread_print_stack(void)
|
||||
s += 5;
|
||||
|
||||
while (*s != STACK_MARKER) {
|
||||
printf("STACK (%u) addr=%X = %X \n", i, (unsigned int) s, (unsigned int) *s);
|
||||
printf("STACK (%d) addr=%X = %X \n", i, (unsigned int) s, (unsigned int) *s);
|
||||
s++;
|
||||
i++;
|
||||
}
|
||||
|
||||
printf("STACK (%u)= %X \n", i, *s);
|
||||
printf("STACK (%d)= %X \n", i, *s);
|
||||
}
|
||||
|
||||
int reboot_arch(int mode)
|
||||
|
@ -73,7 +73,7 @@ extern uintptr_t __heap3_max; ///< maximum for end of heap memory space
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void __assert_func(const char *file, int line, const char *func, const char *failedexpr)
|
||||
{
|
||||
printf("#!assertion %s failed\n\t%s() in %s:%u\n", failedexpr, func, file, line);
|
||||
printf("#!assertion %s failed\n\t%s() in %s:%d\n", failedexpr, func, file, line);
|
||||
_exit(3);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -64,7 +64,7 @@ void heap_stats(void) {
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void __assert_func(const char *file, int line, const char *func, const char *failedexpr)
|
||||
{
|
||||
printf("#! assertion %s failed\n\t%s() in %s:%u\n", failedexpr, func, file, line );
|
||||
printf("#! assertion %s failed\n\t%s() in %s:%d\n", failedexpr, func, file, line );
|
||||
_exit(3);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -270,7 +270,7 @@ void icmpv6_send_echo_request(ipv6_addr_t *destaddr, uint16_t id, uint16_t seq,
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
char addr_str[IPV6_MAX_ADDR_STR_LEN];
|
||||
printf("INFO: send echo request (id = %04x, seq = %d, data_len = %d) to: %s\n",
|
||||
printf("INFO: send echo request (id = %04x, seq = %d, data_len = %zu) to: %s\n",
|
||||
id, seq, data_len, ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
|
||||
&ipv6_buf->destaddr));
|
||||
#endif
|
||||
@ -309,7 +309,7 @@ void icmpv6_send_echo_reply(ipv6_addr_t *destaddr, uint16_t id, uint16_t seq, ui
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
char addr_str[IPV6_MAX_ADDR_STR_LEN];
|
||||
printf("INFO: send echo reply (id = %04x, seq = %d, data_len = %d) to: %s\n",
|
||||
printf("INFO: send echo reply (id = %04x, seq = %d, data_len = %zu) to: %s\n",
|
||||
id, seq, data_len, ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
|
||||
&ipv6_buf->destaddr));
|
||||
#endif
|
||||
@ -386,7 +386,7 @@ void recv_echo_req(void)
|
||||
ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
|
||||
&ipv6_buf->srcaddr));
|
||||
printf("\n");
|
||||
printf("id = 0x%04x, seq = %d, data_len = %d\n", NTOHS(echo_buf->id),
|
||||
printf("id = 0x%04x, seq = %d, data_len = %zu\n", NTOHS(echo_buf->id),
|
||||
NTOHS(echo_buf->seq), data_len);
|
||||
|
||||
for (size_t i = 0; i < data_len; i++) {
|
||||
@ -415,7 +415,7 @@ void recv_echo_repl(void)
|
||||
ipv6_addr_to_str(addr_str, IPV6_MAX_ADDR_STR_LEN,
|
||||
&ipv6_buf->srcaddr));
|
||||
printf("\n");
|
||||
printf("id = 0x%04x, seq = %d, data_len = %d\n", NTOHS(echo_buf->id),
|
||||
printf("id = 0x%04x, seq = %d, data_len = %zu\n", NTOHS(echo_buf->id),
|
||||
NTOHS(echo_buf->seq), data_len);
|
||||
|
||||
for (size_t i = 0; i < data_len; i++) {
|
||||
|
@ -67,7 +67,7 @@ void thread_print_all(void)
|
||||
stacksz -= thread_measure_stack_free(p->stack_start);
|
||||
printf("\t%3u | %-21s| %-8s %.1s | %3i | %5i (%5i) %p"
|
||||
#if SCHEDSTATISTICS
|
||||
" | %6.3f%% | %8u"
|
||||
" | %6.3f%% | %8d"
|
||||
#endif
|
||||
"\n",
|
||||
p->pid, p->name, sname, queued, p->priority, p->stack_size, stacksz, p->stack_start
|
||||
|
@ -27,7 +27,7 @@ void _id_handler(int argc, char **argv)
|
||||
}
|
||||
else {
|
||||
long newid = atoi(argv[1]);
|
||||
printf("Setting new id %lu\n", newid);
|
||||
printf("Setting new id %ld\n", newid);
|
||||
sysconfig.id = newid;
|
||||
|
||||
if (!config_save()) {
|
||||
|
@ -47,7 +47,7 @@ void _rpl_route_handler(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
puts("--------------------------------------------------------------------");
|
||||
printf(" %d routing table entries\n", c);
|
||||
printf(" %u routing table entries\n", c);
|
||||
|
||||
puts("$");
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ int main(void)
|
||||
puts("sleep 1");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
unsigned int s = i;
|
||||
printf("calling sleep(%d)\n", s);
|
||||
printf("calling sleep(%u)\n", s);
|
||||
sleep(s);
|
||||
puts("wake up");
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ int main(void)
|
||||
int cur_iteration = (int) m.type;
|
||||
char *child = (char *) m.content.ptr;
|
||||
|
||||
printf("Received message from %s, iteration %u / %u: %s\n",
|
||||
printf("Received message from %s, iteration %d / %u: %s\n",
|
||||
child, cur_iteration, NUM_ITERATIONS,
|
||||
cur_iteration >= last_iteration ? "okay" : "ERROR");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user