Fix compiler warnings
This commit is contained in:
parent
d8fe44645c
commit
a026c94467
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: httpd.c,v 1.19 2010/10/19 18:29:03 adamdunkels Exp $
|
||||
* $Id: httpd.c,v 1.20 2010/12/14 22:45:22 dak664 Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -185,7 +185,7 @@ PT_THREAD(handle_script(struct httpd_state *s))
|
|||
static
|
||||
PT_THREAD(send_headers(struct httpd_state *s, const char *statushdr))
|
||||
{
|
||||
const char *ptr;
|
||||
const char *ptr = NULL; //gcc warning if not initialized
|
||||
|
||||
PSOCK_BEGIN(&s->sout);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip_arp.c,v 1.7 2010/10/24 22:29:39 adamdunkels Exp $
|
||||
* $Id: uip_arp.c,v 1.8 2010/12/14 22:45:22 dak664 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -161,17 +161,19 @@ uip_arp_timer(void)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
static void
|
||||
uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
|
||||
{
|
||||
register struct arp_entry *tabptr;
|
||||
register struct arp_entry *tabptr = arp_table;
|
||||
|
||||
/* Walk through the ARP mapping table and try to find an entry to
|
||||
update. If none is found, the IP -> MAC address mapping is
|
||||
inserted in the ARP table. */
|
||||
for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
|
||||
|
||||
tabptr = &arp_table[i];
|
||||
|
||||
/* Only check those entries that are actually in use. */
|
||||
if(!uip_ipaddr_cmp(&tabptr->ipaddr, &uip_all_zeroes_addr)) {
|
||||
|
||||
|
@ -186,6 +188,7 @@ uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
|
|||
return;
|
||||
}
|
||||
}
|
||||
tabptr++;
|
||||
}
|
||||
|
||||
/* If we get here, no existing ARP table entry was found, so we
|
||||
|
@ -362,7 +365,7 @@ uip_arp_arpin(void)
|
|||
void
|
||||
uip_arp_out(void)
|
||||
{
|
||||
struct arp_entry *tabptr;
|
||||
struct arp_entry *tabptr = arp_table;
|
||||
|
||||
/* Find the destination IP address in the ARP table and construct
|
||||
the Ethernet header. If the destination IP addres isn't on the
|
||||
|
@ -393,12 +396,11 @@ uip_arp_out(void)
|
|||
/* Else, we use the destination IP address. */
|
||||
uip_ipaddr_copy(&ipaddr, &IPBUF->destipaddr);
|
||||
}
|
||||
|
||||
for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
|
||||
tabptr = &arp_table[i];
|
||||
if(uip_ipaddr_cmp(&ipaddr, &tabptr->ipaddr)) {
|
||||
break;
|
||||
}
|
||||
tabptr++;
|
||||
}
|
||||
|
||||
if(i == UIP_ARPTAB_SIZE) {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
*
|
||||
* This file is part of the uIP TCP/IP stack and the Contiki operating system.
|
||||
*
|
||||
* $Id: uiplib.c,v 1.2 2010/05/31 15:22:08 nifi Exp $
|
||||
* $Id: uiplib.c,v 1.3 2010/12/14 22:45:22 dak664 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -48,7 +48,7 @@ uiplib_ipaddrconv(const char *addrstr, uip_ipaddr_t *ipaddr)
|
|||
#if UIP_CONF_IPV6
|
||||
uint16_t value;
|
||||
int tmp, len, zero;
|
||||
char c;
|
||||
char c = 0; //gcc warning if not initialized
|
||||
|
||||
value = 0;
|
||||
zero = -1;
|
||||
|
|
Loading…
Reference in a new issue