mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
fix warning: invalid suffix on literal
C++11 requires a space between literal and identifier [-Wliteral-suffix]
This commit is contained in:
parent
09bdb56d52
commit
0309fecc19
@ -62,6 +62,6 @@ unsigned long hwtimer_arch_now(void)
|
||||
|
||||
void hwtimer_arch_init(void (*handler)(int), uint32_t fcpu)
|
||||
{
|
||||
DEBUG("hwtimer_arch_init(%p, %"PRIu32"): not implemented\n", handler, fcpu);
|
||||
DEBUG("hwtimer_arch_init(%p, %" PRIu32 "): not implemented\n", handler, fcpu);
|
||||
return;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ void mutex_wait(struct mutex_t *mutex)
|
||||
n.data = (unsigned int) active_thread;
|
||||
n.next = NULL;
|
||||
|
||||
DEBUG("%s: Adding node to mutex queue: prio: %"PRIu32"\n", active_thread->name, n.priority);
|
||||
DEBUG("%s: Adding node to mutex queue: prio: %" PRIu32 "\n", active_thread->name, n.priority);
|
||||
|
||||
queue_priority_add(&(mutex->queue), &n);
|
||||
|
||||
|
@ -107,13 +107,13 @@ void queue_print(queue_node_t *node)
|
||||
|
||||
while (node->next != NULL) {
|
||||
node = node->next;
|
||||
printf("Data: %u Priority: %"PRIu32"\n", node->data, node->priority);
|
||||
printf("Data: %u Priority: %" PRIu32 "\n", node->data, node->priority);
|
||||
}
|
||||
}
|
||||
|
||||
void queue_print_node(queue_node_t *node)
|
||||
{
|
||||
printf("Data: %u Priority: %"PRIu32" Next: %u\n", (unsigned int)node->data, node->priority, (unsigned int)node->next);
|
||||
printf("Data: %u Priority: %" PRIu32 " Next: %u\n", (unsigned int)node->data, node->priority, (unsigned int)node->next);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -111,13 +111,13 @@ radio_address_t nativenet_get_address()
|
||||
|
||||
uint64_t nativenet_get_address_long(void)
|
||||
{
|
||||
DEBUG("nativenet_get_address_long -> address = %"PRIx64"\n", _native_net_addr_long);
|
||||
DEBUG("nativenet_get_address_long -> address = %" PRIx64 "\n", _native_net_addr_long);
|
||||
return _native_net_addr_long;
|
||||
}
|
||||
|
||||
uint64_t nativenet_set_address_long(uint64_t address)
|
||||
{
|
||||
DEBUG("nativenet_set_address_long(address=%"PRIx64")\n", address);
|
||||
DEBUG("nativenet_set_address_long(address=%" PRIx64 ")\n", address);
|
||||
warnx("nativenet_set_address_long: this does not actually change the interfaces address");
|
||||
_native_net_addr_long = address;
|
||||
return _native_net_addr_long;
|
||||
@ -126,7 +126,7 @@ uint64_t nativenet_set_address_long(uint64_t address)
|
||||
int8_t nativenet_send(radio_packet_t *packet)
|
||||
{
|
||||
packet->src = _native_net_addr;
|
||||
DEBUG("nativenet_send: Sending packet of length %"PRIu16" from %"PRIu16" to %"PRIu16"\n", packet->length, packet->src, packet->dst);
|
||||
DEBUG("nativenet_send: Sending packet of length %" PRIu16 " from %" PRIu16 " to %" PRIu16 "\n", packet->length, packet->src, packet->dst);
|
||||
|
||||
return send_buf(packet);
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void _native_handle_tap_input(void)
|
||||
warnx("_native_handle_tap_input: packet with malicious length field received, discarding");
|
||||
}
|
||||
else {
|
||||
DEBUG("_native_handle_tap_input: received packet of length %"PRIu16" for %"PRIu16" from %"PRIu16"\n", p.length, p.dst, p.src);
|
||||
DEBUG("_native_handle_tap_input: received packet of length %" PRIu16 " for %" PRIu16 " from %" PRIu16 "\n", p.length, p.dst, p.src);
|
||||
_nativenet_handle_packet(&p);
|
||||
}
|
||||
}
|
||||
@ -214,7 +214,7 @@ int8_t send_buf(radio_packet_t *packet)
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
||||
DEBUG("send_buf: Sending packet of length %"PRIu16" from %"PRIu16" to %"PRIu16"\n", packet->length, packet->src, packet->dst);
|
||||
DEBUG("send_buf: Sending packet of length %" PRIu16 " from %" PRIu16 " to %" PRIu16 "\n", packet->length, packet->src, packet->dst);
|
||||
to_send = _native_marshall_ethernet(buf, packet);
|
||||
|
||||
DEBUG("send_buf: trying to send %d bytes\n", to_send);
|
||||
|
@ -48,13 +48,13 @@ void set_address_handler(uint16_t a)
|
||||
tcmd.data = &a;
|
||||
mesg.content.ptr = (char *) &tcmd;
|
||||
|
||||
printf("trying to set address %"PRIu16"\n", a);
|
||||
printf("trying to set address %" PRIu16 "\n", a);
|
||||
mesg.type = SET_ADDRESS;
|
||||
|
||||
printf("transceiver_pid=%d\n", transceiver_pid);
|
||||
|
||||
msg_send_receive(&mesg, &mesg, transceiver_pid);
|
||||
printf("got address: %"PRIu16"\n", a);
|
||||
printf("got address: %" PRIu16 "\n", a);
|
||||
}
|
||||
|
||||
void populate_cache(void)
|
||||
|
@ -180,7 +180,7 @@ void sixlowpan_lowpan_sendto(const ieee_802154_long_t *dest,
|
||||
}
|
||||
|
||||
/* check if packet needs to be fragmented */
|
||||
DEBUG("sixlowpan_lowpan_sendto(%s, data, %"PRIu16"): send_packet_length: %"PRIu16", header_size: %"PRIu16"\n",
|
||||
DEBUG("sixlowpan_lowpan_sendto(%s, data, %" PRIu16 "): send_packet_length: %" PRIu16 ", header_size: %" PRIu16 "\n",
|
||||
sixlowpan_mac_802154_long_addr_to_str(addr_str, dest), data_len, send_packet_length, header_size);
|
||||
if (send_packet_length + header_size > PAYLOAD_SIZE - IEEE_802154_MAX_HDR_LEN) {
|
||||
uint8_t fragbuf[send_packet_length + header_size];
|
||||
|
@ -141,7 +141,7 @@ void trickle_interval_over(void)
|
||||
while (1) {
|
||||
thread_sleep();
|
||||
I = I * 2;
|
||||
DEBUG("TRICKLE new Interval %"PRIu32"\n", I);
|
||||
DEBUG("TRICKLE new Interval %" PRIu32 "\n", I);
|
||||
|
||||
if (I == 0) {
|
||||
puts("[WARNING] Interval was 0");
|
||||
|
@ -80,7 +80,7 @@ static void sem_thread_blocked(sem_t *sem)
|
||||
n.data = (size_t) active_thread;
|
||||
n.next = NULL;
|
||||
|
||||
DEBUG("%s: Adding node to mutex queue: prio: %"PRIu32"\n",
|
||||
DEBUG("%s: Adding node to mutex queue: prio: %" PRIu32 "\n",
|
||||
active_thread->name, n.priority);
|
||||
|
||||
/* add myself to the waiters queue */
|
||||
|
@ -69,7 +69,7 @@ void _transceiver_get_set_address_handler(char *addr)
|
||||
|
||||
if (strlen(addr) > 5) {
|
||||
a = atoi(addr + 5);
|
||||
printf("[transceiver] trying to set address %"PRIu16"\n", a);
|
||||
printf("[transceiver] trying to set address %" PRIu16 "\n", a);
|
||||
mesg.type = SET_ADDRESS;
|
||||
}
|
||||
else {
|
||||
@ -77,7 +77,7 @@ void _transceiver_get_set_address_handler(char *addr)
|
||||
}
|
||||
|
||||
msg_send_receive(&mesg, &mesg, transceiver_pid);
|
||||
printf("[transceiver] got address: %"PRIu16"\n", a);
|
||||
printf("[transceiver] got address: %" PRIu16 "\n", a);
|
||||
}
|
||||
|
||||
/* checked for type safety */
|
||||
@ -98,7 +98,7 @@ void _transceiver_get_set_channel_handler(char *chan)
|
||||
|
||||
if (strlen(chan) > 5) {
|
||||
c = atoi(chan + 5);
|
||||
printf("[transceiver] Trying to set channel %"PRIi32"\n", c);
|
||||
printf("[transceiver] Trying to set channel %" PRIi32 "\n", c);
|
||||
mesg.type = SET_CHANNEL;
|
||||
}
|
||||
else {
|
||||
@ -110,7 +110,7 @@ void _transceiver_get_set_channel_handler(char *chan)
|
||||
puts("[transceiver] Error setting/getting channel");
|
||||
}
|
||||
else {
|
||||
printf("[transceiver] Got channel: %"PRIi32"\n", c);
|
||||
printf("[transceiver] Got channel: %" PRIi32 "\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,10 +147,10 @@ void _transceiver_send_handler(char *pkt)
|
||||
p.dst = addr;
|
||||
mesg.type = SND_PKT;
|
||||
mesg.content.ptr = (char *)&tcmd;
|
||||
printf("[transceiver] Sending packet of length %"PRIu16" to %"PRIu16": %s\n", p.length, p.dst, (char*) p.data);
|
||||
printf("[transceiver] Sending packet of length %" PRIu16 " to %" PRIu16 ": %s\n", p.length, p.dst, (char*) p.data);
|
||||
msg_send_receive(&mesg, &mesg, transceiver_pid);
|
||||
response = mesg.content.value;
|
||||
printf("[transceiver] Packet sent: %"PRIi8"\n", response);
|
||||
printf("[transceiver] Packet sent: %" PRIi8 "\n", response);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -176,7 +176,7 @@ void _transceiver_monitor_handler(char *mode)
|
||||
|
||||
if (strlen(mode) > 8) {
|
||||
m = atoi(mode + 8);
|
||||
printf("Setting monitor mode: %"PRIu8"\n", m);
|
||||
printf("Setting monitor mode: %" PRIu8 "\n", m);
|
||||
mesg.type = SET_MONITOR;
|
||||
msg_send(&mesg, transceiver_pid, 1);
|
||||
}
|
||||
@ -201,7 +201,7 @@ void _transceiver_get_set_pan_handler(char *pan) {
|
||||
mesg.content.ptr = (char*) &tcmd;
|
||||
if (strlen(pan) > 4) {
|
||||
p = atoi(pan+4);
|
||||
printf("[transceiver] Trying to set pan %"PRIi32"\n", p);
|
||||
printf("[transceiver] Trying to set pan %" PRIi32 "\n", p);
|
||||
mesg.type = SET_PAN;
|
||||
}
|
||||
else {
|
||||
@ -212,7 +212,7 @@ void _transceiver_get_set_pan_handler(char *pan) {
|
||||
puts("[transceiver] Error setting/getting pan");
|
||||
}
|
||||
else {
|
||||
printf("[transceiver] Got pan: %"PRIi32"\n", p);
|
||||
printf("[transceiver] Got pan: %" PRIi32 "\n", p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ void _transceiver_set_ignore_handler(char *addr)
|
||||
|
||||
if (strlen(addr) > 4) {
|
||||
a = atoi(addr + 4);
|
||||
printf("[transceiver] trying to add address %"PRIu16" to the ignore list \n", a);
|
||||
printf("[transceiver] trying to add address %" PRIu16 " to the ignore list \n", a);
|
||||
mesg.type = DBG_IGN;
|
||||
msg_send_receive(&mesg, &mesg, transceiver_pid);
|
||||
response = a;
|
||||
@ -244,7 +244,7 @@ void _transceiver_set_ignore_handler(char *addr)
|
||||
printf("Error: ignore list full\n");
|
||||
}
|
||||
else {
|
||||
printf("Success (added at index %"PRIi16").\n", response);
|
||||
printf("Success (added at index %" PRIi16 ").\n", response);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -124,5 +124,5 @@ uint64_t timex_uint64(const timex_t a)
|
||||
|
||||
void timex_print(const timex_t t)
|
||||
{
|
||||
printf("Seconds: %"PRIu32" - Microseconds: %"PRIu32"\n", t.seconds, t.microseconds);
|
||||
printf("Seconds: %" PRIu32 " - Microseconds: %" PRIu32 "\n", t.seconds, t.microseconds);
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ static void receive_packet(uint16_t type, uint8_t pos)
|
||||
for (uint8_t i = 0; (i < MAX_IGNORED_ADDR) && (ignored_addr[i]); i++) {
|
||||
DEBUG("check if source (%u) is ignored -> %u\n", trans_p->src, ignored_addr[i]);
|
||||
if (trans_p->src == ignored_addr[i]) {
|
||||
DEBUG("ignored packet from %"PRIu16"\n", trans_p->src);
|
||||
DEBUG("ignored packet from %" PRIu16 "\n", trans_p->src);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -548,7 +548,7 @@ void receive_nativenet_packet(radio_packet_t *trans_p) {
|
||||
memcpy(&(data_buffer[transceiver_buffer_pos * PAYLOAD_SIZE]), p->data, p->length);
|
||||
trans_p->data = (uint8_t*) &(data_buffer[transceiver_buffer_pos * PAYLOAD_SIZE]);
|
||||
|
||||
DEBUG("Packet %p was from %"PRIu16" to %"PRIu16", size: %"PRIu8"\n", trans_p, trans_p->src, trans_p->dst, trans_p->length);
|
||||
DEBUG("Packet %p was from %" PRIu16 " to %" PRIu16 ", size: %" PRIu8 "\n", trans_p, trans_p->src, trans_p->dst, trans_p->length);
|
||||
|
||||
/* reset interrupts */
|
||||
restoreIRQ(state);
|
||||
|
@ -389,7 +389,7 @@ void vtimer_print_long_queue(){
|
||||
|
||||
void vtimer_print(vtimer_t *t)
|
||||
{
|
||||
printf("Seconds: %"PRIu32" - Microseconds: %"PRIu32"\n \
|
||||
printf("Seconds: %" PRIu32 " - Microseconds: %" PRIu32 "\n \
|
||||
action: %p\n \
|
||||
arg: %p\n \
|
||||
pid: %u\n",
|
||||
|
Loading…
Reference in New Issue
Block a user