Merge pull request #550 from oliverschmidt/master

Avoid compiler warnings.
This commit is contained in:
Oliver Schmidt 2014-01-31 16:22:53 -08:00
commit e16521e5c1
5 changed files with 21 additions and 39 deletions

View File

@ -456,7 +456,6 @@ quit(void)
PROCESS_THREAD(www_process, ev, data)
{
static struct ctk_widget *w;
static unsigned char i;
#if WWW_CONF_WITH_WGET
static char *argptr;
#endif /* WWW_CONF_WITH_WGET */

View File

@ -774,7 +774,7 @@ check_entries(void)
static void
newdata(void)
{
static uint8_t nquestions, nanswers, nauthrr;
static uint8_t nquestions, nanswers;
static int8_t i;
@ -863,6 +863,7 @@ newdata(void)
}
return;
} else {
static uint8_t nauthrr;
PRINTF("resolver: But we are still probing. Waiting...\n");
/* We are still probing. We need to do the mDNS
* probe race condition check here and make sure

View File

@ -102,7 +102,6 @@ struct arp_entry {
static const struct uip_eth_addr broadcast_ethaddr =
{{0xff,0xff,0xff,0xff,0xff,0xff}};
static const uint16_t broadcast_ipaddr[2] = {0xffff,0xffff};
static struct arp_entry arp_table[UIP_ARPTAB_SIZE];
static uip_ipaddr_t ipaddr;

View File

@ -64,16 +64,17 @@
#define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len])
#define UIP_FIRST_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[UIP_LLIPH_LEN])
/** \brief temporary IP address */
static uip_ipaddr_t tmp_ipaddr;
#if UIP_CONF_IPV6_RPL
#include "rpl/rpl.h"
#endif /* UIP_CONF_IPV6_RPL */
#if UIP_CONF_IPV6
/** \brief temporary IP address */
static uip_ipaddr_t tmp_ipaddr;
LIST(echo_reply_callback_list);
#if UIP_CONF_IPV6
/*---------------------------------------------------------------------------*/
void
uip_icmp6_echo_request_input(void)

View File

@ -86,11 +86,9 @@ chksum(void) {
asm("lda _chksum_ptr+1");
asm("sta ptr1+1");
asm("lda _chksum_len+1");
asm("beq chksumlast");
/* If checksum is > 256, do the first runs. */
asm("ldy #0");
asm("clc");
@ -116,7 +114,7 @@ chksum(void) {
asm("adc #0");
asm("sta tmp1+1");
asm("bcs chksum_endloop_256");
asm("chksumlast:");
asm("lda _chksum_len");
asm("lsr");
@ -156,7 +154,7 @@ chksum(void) {
asm("jmp chksum_loop1");
asm("chksum_loop1_end:");
asm("plp");
asm("chksum_endloop:");
asm("lda tmp1");
asm("adc #0");
@ -165,9 +163,11 @@ chksum(void) {
asm("adc #0");
asm("sta tmp1+1");
asm("bcs chksum_endloop");
asm("lda tmp1");
asm("ldx tmp1+1");
return __AX__;
}
#pragma optimize(pop)
/*-----------------------------------------------------------------------------------*/
@ -204,7 +204,7 @@ uip_chksum(uint16_t *buf, uint16_t len)
/*-----------------------------------------------------------------------------------*/
uint16_t
uip_ipchksum(void)
{
{
chksum_ptr = (uint16_t)uip_buf + UIP_LLH_LEN;
chksum_len = UIP_IPH_LEN;
return chksum();
@ -241,7 +241,7 @@ transport_chksum(uint8_t protocol)
/* asm("bcc noinc");
asm("inc _chksum_tmp");
asm("noinc:");*/
asm("tcpchksum_loop1:");
asm("lda _chksum_tmp");
asm("adc #0");
@ -251,7 +251,6 @@ transport_chksum(uint8_t protocol)
asm("sta _chksum_tmp+1");
asm("bcs tcpchksum_loop1");
asm("lda _uip_aligned_buf+3+%b", UIP_LLH_LEN);
asm("sec");
asm("sbc #%b", UIP_IPH_LEN);
@ -259,8 +258,7 @@ transport_chksum(uint8_t protocol)
asm("lda _uip_aligned_buf+2+%b", UIP_LLH_LEN);
asm("sbc #0");
asm("sta _chksum_len+1");
asm("ldy #$0c");
asm("clc");
asm("php");
@ -279,7 +277,7 @@ transport_chksum(uint8_t protocol)
asm("bne tcpchksum_loop2");
asm("plp");
asm("lda _chksum_tmp");
asm("adc #0");
asm("sta _chksum_tmp");
@ -287,7 +285,6 @@ transport_chksum(uint8_t protocol)
asm("adc %v", chksum_protocol);
asm("sta _chksum_tmp+1");
asm("lda _chksum_tmp");
asm("adc _chksum_len+1");
asm("sta _chksum_tmp");
@ -295,8 +292,6 @@ transport_chksum(uint8_t protocol)
asm("adc _chksum_len");
asm("sta _chksum_tmp+1");
asm("tcpchksum_loop3:");
asm("lda _chksum_tmp");
asm("adc #0");
@ -306,7 +301,6 @@ transport_chksum(uint8_t protocol)
asm("sta _chksum_tmp+1");
asm("bcs tcpchksum_loop3");
return chksum_tmp;
}
#pragma optimize(pop)
@ -343,7 +337,7 @@ uip_tcpchksum(void)
/* asm("bcc noinc");
asm("inc _chksum_tmp");
asm("noinc:");*/
asm("tcpchksum_loop1:");
asm("lda _chksum_tmp");
asm("adc #0");
@ -353,7 +347,6 @@ uip_tcpchksum(void)
asm("sta _chksum_tmp+1");
asm("bcs tcpchksum_loop1");
asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
asm("sec");
asm("sbc #%b", UIP_IPH_LEN);
@ -361,8 +354,7 @@ uip_tcpchksum(void)
asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
asm("sbc #0");
asm("sta _chksum_len+1");
asm("ldy #$0c");
asm("clc");
asm("php");
@ -381,7 +373,7 @@ uip_tcpchksum(void)
asm("bne tcpchksum_loop2");
asm("plp");
asm("lda _chksum_tmp");
asm("adc #0");
asm("sta _chksum_tmp");
@ -389,7 +381,6 @@ uip_tcpchksum(void)
asm("adc #6"); /* IP_PROTO_TCP */
asm("sta _chksum_tmp+1");
asm("lda _chksum_tmp");
asm("adc _chksum_len+1");
asm("sta _chksum_tmp");
@ -397,8 +388,6 @@ uip_tcpchksum(void)
asm("adc _chksum_len");
asm("sta _chksum_tmp+1");
asm("tcpchksum_loop3:");
asm("lda _chksum_tmp");
asm("adc #0");
@ -408,7 +397,6 @@ uip_tcpchksum(void)
asm("sta _chksum_tmp+1");
asm("bcs tcpchksum_loop3");
return chksum_tmp;
#endif
}
@ -456,7 +444,6 @@ uip_udpchksum(void)
asm("sta _chksum_tmp+1");
asm("bcs tcpchksum_loop1");
asm("lda _uip_buf+3+%b", UIP_LLH_LEN);
asm("sec");
asm("sbc #20");
@ -464,8 +451,7 @@ uip_udpchksum(void)
asm("lda _uip_buf+2+%b", UIP_LLH_LEN);
asm("sbc #0");
asm("sta _chksum_len+1");
asm("ldy #$0c");
asm("clc");
asm("php");
@ -484,7 +470,7 @@ uip_udpchksum(void)
asm("bne tcpchksum_loop2");
asm("plp");
asm("lda _chksum_tmp");
asm("adc #0");
asm("sta _chksum_tmp");
@ -492,7 +478,6 @@ uip_udpchksum(void)
asm("adc #17"); /* IP_PROTO_UDP */
asm("sta _chksum_tmp+1");
asm("lda _chksum_tmp");
asm("adc _chksum_len+1");
asm("sta _chksum_tmp");
@ -500,8 +485,6 @@ uip_udpchksum(void)
asm("adc _chksum_len");
asm("sta _chksum_tmp+1");
asm("tcpchksum_loop3:");
asm("lda _chksum_tmp");
asm("adc #0");
@ -511,7 +494,6 @@ uip_udpchksum(void)
asm("sta _chksum_tmp+1");
asm("bcs tcpchksum_loop3");
return chksum_tmp;
#endif
}