mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
tcp_priv.h: Fix compile warnings when TCP_DEBUG_PCB_LISTS is set
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
fa55458c42
commit
e935faf2bc
@ -357,7 +357,7 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS];
|
|||||||
#if TCP_DEBUG_PCB_LISTS
|
#if TCP_DEBUG_PCB_LISTS
|
||||||
#define TCP_REG(pcbs, npcb) do {\
|
#define TCP_REG(pcbs, npcb) do {\
|
||||||
struct tcp_pcb *tcp_tmp_pcb; \
|
struct tcp_pcb *tcp_tmp_pcb; \
|
||||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", (npcb), (npcb)->local_port)); \
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %"U16_F"\n", (void *)(npcb), (npcb)->local_port)); \
|
||||||
for (tcp_tmp_pcb = *(pcbs); \
|
for (tcp_tmp_pcb = *(pcbs); \
|
||||||
tcp_tmp_pcb != NULL; \
|
tcp_tmp_pcb != NULL; \
|
||||||
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
||||||
@ -367,13 +367,13 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS];
|
|||||||
(npcb)->next = *(pcbs); \
|
(npcb)->next = *(pcbs); \
|
||||||
LWIP_ASSERT("TCP_REG: npcb->next != npcb", (npcb)->next != (npcb)); \
|
LWIP_ASSERT("TCP_REG: npcb->next != npcb", (npcb)->next != (npcb)); \
|
||||||
*(pcbs) = (npcb); \
|
*(pcbs) = (npcb); \
|
||||||
LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \
|
LWIP_ASSERT("TCP_REG: tcp_pcbs sane", tcp_pcbs_sane()); \
|
||||||
tcp_timer_needed(); \
|
tcp_timer_needed(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#define TCP_RMV(pcbs, npcb) do { \
|
#define TCP_RMV(pcbs, npcb) do { \
|
||||||
struct tcp_pcb *tcp_tmp_pcb; \
|
struct tcp_pcb *tcp_tmp_pcb; \
|
||||||
LWIP_ASSERT("TCP_RMV: pcbs != NULL", *(pcbs) != NULL); \
|
LWIP_ASSERT("TCP_RMV: pcbs != NULL", *(pcbs) != NULL); \
|
||||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", (npcb), *(pcbs))); \
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", (void *)(npcb), (void *)(*(pcbs)))); \
|
||||||
if(*(pcbs) == (npcb)) { \
|
if(*(pcbs) == (npcb)) { \
|
||||||
*(pcbs) = (*pcbs)->next; \
|
*(pcbs) = (*pcbs)->next; \
|
||||||
} else for (tcp_tmp_pcb = *(pcbs); tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
} else for (tcp_tmp_pcb = *(pcbs); tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
||||||
@ -384,7 +384,7 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS];
|
|||||||
} \
|
} \
|
||||||
(npcb)->next = NULL; \
|
(npcb)->next = NULL; \
|
||||||
LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \
|
LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \
|
||||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", (npcb), *(pcbs))); \
|
LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", (void *)(npcb), (void *)(*(pcbs)))); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#else /* LWIP_DEBUG */
|
#else /* LWIP_DEBUG */
|
||||||
|
Loading…
Reference in New Issue
Block a user