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.)

This commit is contained in:
goldsimon 2007-06-08 12:00:45 +00:00
parent fb5a1a2c0f
commit 5ee9c95ebd

View File

@ -222,8 +222,8 @@ enum tcp_state {
/** /**
* members common to struct tcp_pcb and struct tcp_listen_pcb * members common to struct tcp_pcb and struct tcp_listen_pcb
*/ */
#define TCP_PCB_COMMON \ #define TCP_PCB_COMMON(type) \
struct tcp_pcb *next; /* for the linked list */ \ type *next; /* for the linked list */ \
enum tcp_state state; /* TCP state */ \ enum tcp_state state; /* TCP state */ \
u8_t prio; \ u8_t prio; \
void *callback_arg; \ void *callback_arg; \
@ -235,7 +235,7 @@ struct tcp_pcb {
/** common PCB members */ /** common PCB members */
IP_PCB; IP_PCB;
/** protocol specific PCB members */ /** protocol specific PCB members */
TCP_PCB_COMMON; TCP_PCB_COMMON(struct tcp_pcb);
/* ports are in host byte order */ /* ports are in host byte order */
u16_t remote_port; u16_t remote_port;
@ -336,7 +336,7 @@ struct tcp_pcb_listen {
/* Common members of all PCB types */ /* Common members of all PCB types */
IP_PCB; IP_PCB;
/* Protocol specific PCB members */ /* Protocol specific PCB members */
TCP_PCB_COMMON; TCP_PCB_COMMON(struct tcp_pcb_listen);
#if LWIP_CALLBACK_API #if LWIP_CALLBACK_API
/* Function to call when a listener has been connected. */ /* Function to call when a listener has been connected. */