Permalink
Browse files

Merge pull request #550 from oliverschmidt/master

Avoid compiler warnings.
  • Loading branch information...
2 parents c0ef70f + a94e7e6 commit e16521e5c18a884c254615cc9690577aef395b6b @oliverschmidt oliverschmidt committed Feb 1, 2014
Showing with 21 additions and 39 deletions.
  1. +0 −1 apps/webbrowser/www.c
  2. +2 −1 core/net/ip/resolv.c
  3. +0 −1 core/net/ipv4/uip_arp.c
  4. +5 −4 core/net/ipv6/uip-icmp6.c
  5. +14 −32 cpu/6502/net/uip_arch.c
@@ -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 */
@@ -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
@@ -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;
@@ -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)
@@ -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,16 +251,14 @@ 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);
asm("sta _chksum_len");
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,24 +277,21 @@ transport_chksum(uint8_t protocol)
asm("bne tcpchksum_loop2");
asm("plp");
-
+
asm("lda _chksum_tmp");
asm("adc #0");
asm("sta _chksum_tmp");
asm("lda _chksum_tmp+1");
asm("adc %v", chksum_protocol);
asm("sta _chksum_tmp+1");
-
asm("lda _chksum_tmp");
asm("adc _chksum_len+1");
asm("sta _chksum_tmp");
asm("lda _chksum_tmp+1");
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,16 +347,14 @@ 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);
asm("sta _chksum_len");
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,24 +373,21 @@ uip_tcpchksum(void)
asm("bne tcpchksum_loop2");
asm("plp");
-
+
asm("lda _chksum_tmp");
asm("adc #0");
asm("sta _chksum_tmp");
asm("lda _chksum_tmp+1");
asm("adc #6"); /* IP_PROTO_TCP */
asm("sta _chksum_tmp+1");
-
asm("lda _chksum_tmp");
asm("adc _chksum_len+1");
asm("sta _chksum_tmp");
asm("lda _chksum_tmp+1");
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,16 +444,14 @@ 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");
asm("sta _chksum_len");
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,24 +470,21 @@ uip_udpchksum(void)
asm("bne tcpchksum_loop2");
asm("plp");
-
+
asm("lda _chksum_tmp");
asm("adc #0");
asm("sta _chksum_tmp");
asm("lda _chksum_tmp+1");
asm("adc #17"); /* IP_PROTO_UDP */
asm("sta _chksum_tmp+1");
-
asm("lda _chksum_tmp");
asm("adc _chksum_len+1");
asm("sta _chksum_tmp");
asm("lda _chksum_tmp+1");
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
}

0 comments on commit e16521e

Please sign in to comment.