Avoid compiler warnings.
This commit is contained in:
parent
424fde144d
commit
98bb911ffa
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: dhcpc.c,v 1.4 2006/08/17 12:51:07 bg- Exp $
|
* @(#)$Id: dhcpc.c,v 1.5 2006/08/27 00:07:15 oliverschmidt Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -175,7 +175,7 @@ send_discover(void)
|
||||||
end = add_req_options(end);
|
end = add_req_options(end);
|
||||||
end = add_end(end);
|
end = add_end(end);
|
||||||
|
|
||||||
uip_send(uip_appdata, end - (u8_t *)uip_appdata);
|
uip_send(uip_appdata, (int)(end - (u8_t *)uip_appdata));
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
|
@ -191,7 +191,7 @@ send_request(void)
|
||||||
end = add_req_ipaddr(end);
|
end = add_req_ipaddr(end);
|
||||||
end = add_end(end);
|
end = add_end(end);
|
||||||
|
|
||||||
uip_send(uip_appdata, end - (u8_t *)uip_appdata);
|
uip_send(uip_appdata, (int)(end - (u8_t *)uip_appdata));
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static u8_t
|
static u8_t
|
||||||
|
@ -348,10 +348,10 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data))
|
||||||
|
|
||||||
if((ntohs(s.lease_time[0])*65536ul + ntohs(s.lease_time[1]))*CLOCK_SECOND/2
|
if((ntohs(s.lease_time[0])*65536ul + ntohs(s.lease_time[1]))*CLOCK_SECOND/2
|
||||||
<= MAX_TICKS) {
|
<= MAX_TICKS) {
|
||||||
s.ticks = (ntohs(s.lease_time[0])*65536ul
|
s.ticks = (u16_t)(ntohs(s.lease_time[0])*65536ul
|
||||||
+ ntohs(s.lease_time[1]))*CLOCK_SECOND/2;
|
+ ntohs(s.lease_time[1]))*CLOCK_SECOND/2;
|
||||||
} else {
|
} else {
|
||||||
s.ticks = MAX_TICKS;
|
s.ticks = (u16_t)MAX_TICKS;
|
||||||
}
|
}
|
||||||
|
|
||||||
etimer_set(&s.etimer, s.ticks);
|
etimer_set(&s.etimer, s.ticks);
|
||||||
|
|
Loading…
Reference in a new issue