Use C style comments.In debug stataments cast various struct pointers to void* to

avoid printf warnings.misc warnings in etharp.
This commit is contained in:
jani 2002-12-17 09:41:16 +00:00
parent a071cbf86c
commit c0a8ef6f6f
6 changed files with 21 additions and 32 deletions

View File

@ -490,7 +490,7 @@ netconn_recv(struct netconn *conn)
DEBUGF(API_LIB_DEBUG, ("netconn_recv: received %p (err %d)\n", buf, conn->err));
DEBUGF(API_LIB_DEBUG, ("netconn_recv: received %p (err %d)\n", (void *)buf, conn->err));
return buf;

View File

@ -77,11 +77,11 @@ tcpip_thread(void *arg)
sys_mbox_fetch(mbox, (void *)&msg);
switch(msg->type) {
case TCPIP_MSG_API:
DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", msg));
DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg));
api_msg_input(msg->msg.apimsg);
break;
case TCPIP_MSG_INPUT:
DEBUGF(TCPIP_DEBUG, ("tcpip_thread: IP packet %p\n", msg));
DEBUGF(TCPIP_DEBUG, ("tcpip_thread: IP packet %p\n", (void *)msg));
ip_input(msg->msg.inp.p, msg->msg.inp.netif);
break;
default:

View File

@ -615,7 +615,7 @@ struct pbuf *
pbuf_unref(struct pbuf *f)
{
struct pbuf *p, *q;
DEBUGF(PBUF_DEBUG, ("pbuf_unref: %p \n", f));
DEBUGF(PBUF_DEBUG, ("pbuf_unref: %p \n", (void*)f));
/* first pbuf is of type PBUF_REF? */
if (f->flags == PBUF_FLAG_REF)
{
@ -641,7 +641,7 @@ pbuf_unref(struct pbuf *f)
/* de-allocate PBUF_REF */
pbuf_free(f);
f = p;
DEBUGF(PBUF_DEBUG, ("pbuf_unref: succesful %p \n", f));
DEBUGF(PBUF_DEBUG, ("pbuf_unref: succesful %p \n", (void *)f));
}
else
{

View File

@ -314,7 +314,7 @@ tcp_listen(struct tcp_pcb *pcb)
#endif /* LWIP_CALLBACK_API */
/* workaround for compile error: assignment requires modifiable lvalue in TCP_REG */
#if LWIP_TCP_REG_COMPILE_ERROR
// place this pcb at the start the "listening pcbs" list
/* place this pcb at the start the "listening pcbs" list */
lpcb->next = tcp_listen_pcbs;
tcp_listen_pcbs = lpcb;
#else
@ -753,7 +753,7 @@ tcp_kill_prio(u8_t prio)
}
if(inactive != NULL) {
DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB 0x%p (%ld)\n",
inactive, inactivity));
(void *)inactive, inactivity));
tcp_abort(inactive);
}
}
@ -775,7 +775,7 @@ tcp_kill_timewait(void)
}
if(inactive != NULL) {
DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB 0x%p (%ld)\n",
inactive, inactivity));
(void *)inactive, inactivity));
tcp_abort(inactive);
}
}
@ -966,7 +966,7 @@ tcp_pcb_purge(struct tcp_pcb *pcb)
if(pcb->unacked != NULL) {
DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->unacked\n"));
}
#if TCP_QUEUE_OOSEQ // LW
#if TCP_QUEUE_OOSEQ /* LW */
if(pcb->ooseq != NULL) {
DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n"));
}

View File

@ -212,9 +212,9 @@ tcp_input(struct pbuf *p, struct netif *inp)
arrivals). */
if(prev != NULL) {
((struct tcp_pcb_listen *)prev)->next = lpcb->next;
// our successor is the remainder of the listening list
/* our successor is the remainder of the listening list */
lpcb->next = tcp_listen_pcbs;
// put this listening pcb at the head of the listening list
/* put this listening pcb at the head of the listening list */
tcp_listen_pcbs = lpcb;
}

View File

@ -3,6 +3,10 @@
* Address Resolution Protocol module for IP over Ethernet
*
* $Log: etharp.c,v $
* Revision 1.16 2002/12/17 09:41:16 jani
* Use C style comments.In debug stataments cast various struct pointers to void* to
* avoid printf warnings.misc warnings in etharp.
*
* Revision 1.15 2002/12/05 09:41:52 kieranm
* Fixed compiler warnings when ARP_QUEUEING is not defined.
*
@ -14,21 +18,6 @@
*
* Revision 1.12 2002/11/28 09:26:18 likewise
* All ARP queueing code is now conditionally compiled-in.
*
* Revision 1.11 2002/11/18 10:31:05 likewise
* Conditionally have ARP queue outgoing pbufs.
*
* Revision 1.10 2002/11/18 08:41:31 jani
* Move etharp packed structures to the header file.
*
* Revision 1.9 2002/11/15 12:41:59 likewise
* ETHARP_SNOOP_UPDATES made externally configurable.
*
* Revision 1.8 2002/11/13 09:10:19 likewise
* ARP entries can now be updated (but not added) on any ARP traffic. Set #define ETHARP_SNOOP_UPDATES 1 to enable.
*
* Revision 1.7 2002/11/13 08:56:11 likewise
* Implemented conditional insertion of ARP entries to update_arp_entry using ARP_INSERT_FLAG.
*/
/*
@ -155,7 +144,7 @@ struct etharp_entry {
};
static const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}};
static struct etharp_entry arp_table[ARP_TABLE_SIZE] = { 0 } ;
static struct etharp_entry arp_table[ARP_TABLE_SIZE];
static u8_t ctime;
static struct pbuf *update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *ethaddr, u8_t flags);
@ -207,7 +196,7 @@ etharp_tmr(void)
(ctime - arp_table[i].ctime >= ARP_MAXPENDING)) {
arp_table[i].state = ETHARP_STATE_EMPTY;
#if ARP_QUEUEING
DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired pending entry %u - dequeueing %p.\n", i, arp_table[i].p));
DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired pending entry %u - dequeueing %p.\n", i, (void *)(arp_table[i].p)));
/* remove any queued packet */
pbuf_free(arp_table[i].p);
arp_table[i].p = NULL;
@ -281,7 +270,7 @@ update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *e
#endif
DEBUGF(ETHARP_DEBUG, ("update_arp_entry()"));
DEBUGF(ETHARP_DEBUG, ("update_arp_entry: %u.%u.%u.%u - %02x:%02x:%02x:%02x:%02x:%02x\n", ip4_addr1(ipaddr), ip4_addr2(ipaddr), ip4_addr3(ipaddr), ip4_addr4(ipaddr),
ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5], ethaddr->addr[6]));
ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5]));
/* do not update for 0.0.0.0 addresses */
if (ipaddr->addr == 0) {
DEBUGF(ETHARP_DEBUG, ("update_arp_entry: will not add 0.0.0.0 to ARP cache\n"));
@ -311,7 +300,7 @@ update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *e
/* time stamp */
arp_table[i].ctime = ctime;
#if ARP_QUEUEING
// queued packet present? */
/* queued packet present? */
if(arp_table[i].p != NULL) {
/* fill-in Ethernet header */
@ -374,7 +363,7 @@ update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *e
}
else
{
DEBUGF(ETHARP_DEBUG, ("update_arp_entry: no matching stable entry to update\n", i));
DEBUGF(ETHARP_DEBUG, ("update_arp_entry: no matching stable entry to update\n"));
}
return NULL;
}
@ -649,7 +638,7 @@ etharp_output(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
/* return the outgoing packet */
return q;
}
// never reached; here for safety
/* never reached; here for safety */
return NULL;
}