examples/rpl-border-router: Fix two minor warnings.

- Remove unused variable i in generate_routes.
 - Add cast to unsigned long for printf(..%lu..) in generate_routes.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
This commit is contained in:
Joakim Gebart 2014-10-04 18:05:38 +02:00
parent fd5e79d0db
commit d4179a0a0c
1 changed files with 7 additions and 8 deletions

View File

@ -143,7 +143,6 @@ ipaddr_add(const uip_ipaddr_t *addr)
static
PT_THREAD(generate_routes(struct httpd_state *s))
{
static int i;
static uip_ds6_route_t *r;
static uip_ds6_nbr_t *nbr;
#if BUF_USES_STACK
@ -247,7 +246,7 @@ PT_THREAD(generate_routes(struct httpd_state *s))
ADD("/%u (via ", r->length);
ipaddr_add(uip_ds6_route_nexthop(r));
if(1 || (r->state.lifetime < 600)) {
ADD(") %lus\n", r->state.lifetime);
ADD(") %lus\n", (unsigned long)r->state.lifetime);
} else {
ADD(")\n");
}