mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
Merge pull request #4559 from thomaseichinger/pr/fix_tftp_formating
tftp: fix formatting warnings/errors
This commit is contained in:
commit
6c521916cd
@ -59,7 +59,7 @@ static bool _tftp_client_start_cb(tftp_action_t action, tftp_mode_t mode,
|
||||
}
|
||||
|
||||
/* display the action being performed */
|
||||
printf("tftp_client: %s %s %s:%u\n", str_mode, str_action, file_name, *len);
|
||||
printf("tftp_client: %s %s %s:%lu\n", str_mode, str_action, file_name, (unsigned long)*len);
|
||||
|
||||
/* return the length of the text, if this is an read action */
|
||||
if (action == TFTP_READ) {
|
||||
@ -92,7 +92,7 @@ static int _tftp_client_data_cb(uint32_t offset, void *data, size_t data_len)
|
||||
}
|
||||
else {
|
||||
/* we received a data block which we output to the console */
|
||||
printf("\n -- CLIENT DATA --\n%.*s\n -- CLIENT DATA --\n", data_len, c);
|
||||
printf("\n -- CLIENT DATA --\n%.*s\n -- CLIENT DATA --\n", (int)data_len, c);
|
||||
}
|
||||
|
||||
/* return the length of the data block */
|
||||
|
||||
@ -65,7 +65,7 @@ static bool _tftp_server_start_cb(tftp_action_t action, tftp_mode_t mode,
|
||||
}
|
||||
|
||||
/* display the action being performed */
|
||||
printf("tftp_server: %s %s %s:%u\n", str_mode, str_action, file_name, *len);
|
||||
printf("tftp_server: %s %s %s:%lu\n", str_mode, str_action, file_name, (unsigned long)*len);
|
||||
|
||||
/* return the length of the text, if this is an read action */
|
||||
if (action == TFTP_READ) {
|
||||
@ -98,7 +98,7 @@ static int _tftp_server_data_cb(uint32_t offset, void *data, size_t data_len)
|
||||
}
|
||||
else {
|
||||
/* we received a data block which we output to the console */
|
||||
printf("\n -- SERVER DATA --\n%.*s\n -- SERVER DATA --\n", data_len, c);
|
||||
printf("\n -- SERVER DATA --\n%.*s\n -- SERVER DATA --\n", (int)data_len, c);
|
||||
}
|
||||
|
||||
/* return the length of the data block */
|
||||
|
||||
@ -1055,9 +1055,9 @@ int _tftp_decode_options(tftp_context_t *ctxt, gnrc_pktsnip_t *buf, uint32_t sta
|
||||
size_t offset = start;
|
||||
|
||||
DEBUG("tftp: decode options\n");
|
||||
DEBUG("tftp: buffer size = %d\n", buf->size);
|
||||
DEBUG("tftp: buffer size = %lu\n", (unsigned long)buf->size);
|
||||
while ((offset + sizeof(uint16_t)) < (buf->size)) {
|
||||
DEBUG("tftp: offset = %d\n", offset);
|
||||
DEBUG("tftp: offset = %lu\n", (unsigned long)offset);
|
||||
/* get the option name */
|
||||
const char *name = (const char *)(pkt->data + offset);
|
||||
offset += strlen(name) + 1;
|
||||
@ -1095,7 +1095,7 @@ int _tftp_decode_options(tftp_context_t *ctxt, gnrc_pktsnip_t *buf, uint32_t sta
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG("tftp: return %d\n", offset);
|
||||
DEBUG("tftp: return %lu\n", (unsigned long)offset);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user