Fixed a bunch of compiler warnings

This commit is contained in:
Adam Dunkels 2013-08-11 23:53:36 +02:00 committed by Simon Duquennoy
parent 9a74ada90c
commit a027832f94
3 changed files with 11 additions and 7 deletions

View file

@ -1076,10 +1076,13 @@ rpl_recalculate_ranks(void)
int int
rpl_process_parent_event(rpl_instance_t *instance, rpl_parent_t *p) rpl_process_parent_event(rpl_instance_t *instance, rpl_parent_t *p)
{ {
rpl_rank_t old_rank;
int return_value; int return_value;
#if DEBUG
rpl_rank_t old_rank;
old_rank = instance->current_dag->rank; old_rank = instance->current_dag->rank;
#endif /* DEBUG */
return_value = 1; return_value = 1;
if(!acceptable_rank(p->dag, p->rank)) { if(!acceptable_rank(p->dag, p->rank)) {

View file

@ -255,10 +255,8 @@ rpl_update_header_final(uip_ipaddr_t *addr)
void void
rpl_remove_header(void) rpl_remove_header(void)
{ {
int last_uip_ext_len;
uint8_t temp_len; uint8_t temp_len;
last_uip_ext_len = uip_ext_len;
uip_ext_len = 0; uip_ext_len = 0;
PRINTF("RPL: Verifying the presence of the RPL header option\n"); PRINTF("RPL: Verifying the presence of the RPL header option\n");

View file

@ -575,8 +575,10 @@ dao_input(void)
uint8_t prefixlen; uint8_t prefixlen;
uint8_t flags; uint8_t flags;
uint8_t subopt_type; uint8_t subopt_type;
/*
uint8_t pathcontrol; uint8_t pathcontrol;
uint8_t pathsequence; uint8_t pathsequence;
*/
uip_ipaddr_t prefix; uip_ipaddr_t prefix;
uip_ds6_route_t *rep; uip_ds6_route_t *rep;
uint8_t buffer_length; uint8_t buffer_length;
@ -628,8 +630,7 @@ dao_input(void)
} }
/* Check if there are any RPL options present. */ /* Check if there are any RPL options present. */
i = pos; for(i = pos; i < buffer_length; i += len) {
for(; i < buffer_length; i += len) {
subopt_type = buffer[i]; subopt_type = buffer[i];
if(subopt_type == RPL_OPTION_PAD1) { if(subopt_type == RPL_OPTION_PAD1) {
len = 1; len = 1;
@ -647,8 +648,8 @@ dao_input(void)
break; break;
case RPL_OPTION_TRANSIT: case RPL_OPTION_TRANSIT:
/* The path sequence and control are ignored. */ /* The path sequence and control are ignored. */
pathcontrol = buffer[i + 3]; /* pathcontrol = buffer[i + 3];
pathsequence = buffer[i + 4]; pathsequence = buffer[i + 4];*/
lifetime = buffer[i + 5]; lifetime = buffer[i + 5];
/* The parent address is also ignored. */ /* The parent address is also ignored. */
break; break;
@ -825,6 +826,7 @@ dao_output_target(rpl_parent_t *parent, uip_ipaddr_t *prefix, uint8_t lifetime)
static void static void
dao_ack_input(void) dao_ack_input(void)
{ {
#if DEBUG
unsigned char *buffer; unsigned char *buffer;
uint8_t buffer_length; uint8_t buffer_length;
uint8_t instance_id; uint8_t instance_id;
@ -842,6 +844,7 @@ dao_ack_input(void)
sequence, status); sequence, status);
PRINT6ADDR(&UIP_IP_BUF->srcipaddr); PRINT6ADDR(&UIP_IP_BUF->srcipaddr);
PRINTF("\n"); PRINTF("\n");
#endif /* DEBUG */
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void