From 5ee9c95ebdfc2b2623421391ac90004bd320023a Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 8 Jun 2007 12:00:45 +0000 Subject: [PATCH] Fixed a cast warning by including the type to TCP_PCB_COMMON: (Moved members common to structures tcp_pcp and tcp_listen_pcb into define TCP_PCB_COMMON (like IP_PCB) to keep (possible) code changes consistent.) --- src/include/lwip/tcp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index efedf89f..3e4fdf78 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -222,8 +222,8 @@ enum tcp_state { /** * members common to struct tcp_pcb and struct tcp_listen_pcb */ -#define TCP_PCB_COMMON \ - struct tcp_pcb *next; /* for the linked list */ \ +#define TCP_PCB_COMMON(type) \ + type *next; /* for the linked list */ \ enum tcp_state state; /* TCP state */ \ u8_t prio; \ void *callback_arg; \ @@ -235,7 +235,7 @@ struct tcp_pcb { /** common PCB members */ IP_PCB; /** protocol specific PCB members */ - TCP_PCB_COMMON; + TCP_PCB_COMMON(struct tcp_pcb); /* ports are in host byte order */ u16_t remote_port; @@ -336,7 +336,7 @@ struct tcp_pcb_listen { /* Common members of all PCB types */ IP_PCB; /* Protocol specific PCB members */ - TCP_PCB_COMMON; + TCP_PCB_COMMON(struct tcp_pcb_listen); #if LWIP_CALLBACK_API /* Function to call when a listener has been connected. */