mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
fix implicit cast warnings in IAR and others
See bug #54190 Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
eeee2b1c55
commit
b398a2a394
@ -370,7 +370,7 @@ err_t netconn_err(struct netconn *conn);
|
||||
#define netconn_recv_bufsize(conn) ((conn)->recv_bufsize)
|
||||
|
||||
#define netconn_set_flags(conn, set_flags) do { (conn)->flags = (u8_t)((conn)->flags | (set_flags)); } while(0)
|
||||
#define netconn_clear_flags(conn, clr_flags) do { (conn)->flags = (u8_t)((conn)->flags & ~(clr_flags)); } while(0)
|
||||
#define netconn_clear_flags(conn, clr_flags) do { (conn)->flags = (u8_t)((conn)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
|
||||
#define netconn_is_flag_set(conn, flag) (((conn)->flags & (flag)) != 0)
|
||||
|
||||
/** Set the blocking status of netconn calls (@todo: write/send is missing) */
|
||||
|
@ -450,7 +450,7 @@ void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);
|
||||
#endif /* LWIP_IPV4 */
|
||||
|
||||
#define netif_set_flags(netif, set_flags) do { (netif)->flags = (u8_t)((netif)->flags | (set_flags)); } while(0)
|
||||
#define netif_clear_flags(netif, clr_flags) do { (netif)->flags = (u8_t)((netif)->flags & ~(clr_flags)); } while(0)
|
||||
#define netif_clear_flags(netif, clr_flags) do { (netif)->flags = (u8_t)((netif)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
|
||||
#define netif_is_flag_set(nefif, flag) (((netif)->flags & (flag)) != 0)
|
||||
|
||||
void netif_set_up(struct netif *netif);
|
||||
|
@ -119,7 +119,7 @@ void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *re
|
||||
#define raw_setflags(pcb,f) ((pcb)->flags = (f))
|
||||
|
||||
#define raw_set_flags(pcb, set_flags) do { (pcb)->flags = (u8_t)((pcb)->flags | (set_flags)); } while(0)
|
||||
#define raw_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & ~(clr_flags)); } while(0)
|
||||
#define raw_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
|
||||
#define raw_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0)
|
||||
|
||||
#define raw_init() /* Compatibility define, no init needed. */
|
||||
|
@ -204,6 +204,7 @@ struct tcp_pcb_ext_args {
|
||||
#endif
|
||||
|
||||
typedef u16_t tcpflags_t;
|
||||
#define TCP_ALLFLAGS 0xffffU
|
||||
|
||||
/**
|
||||
* members common to struct tcp_pcb and struct tcp_listen_pcb
|
||||
@ -420,7 +421,7 @@ void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept);
|
||||
void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval);
|
||||
|
||||
#define tcp_set_flags(pcb, set_flags) do { (pcb)->flags = (tcpflags_t)((pcb)->flags | (set_flags)); } while(0)
|
||||
#define tcp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (tcpflags_t)((pcb)->flags & ~(clr_flags)); } while(0)
|
||||
#define tcp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (tcpflags_t)((pcb)->flags & (tcpflags_t)(~(clr_flags) & TCP_ALLFLAGS)); } while(0)
|
||||
#define tcp_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0)
|
||||
|
||||
#if LWIP_TCP_TIMESTAMPS
|
||||
|
@ -156,7 +156,7 @@ err_t udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p,
|
||||
#define udp_setflags(pcb, f) ((pcb)->flags = (f))
|
||||
|
||||
#define udp_set_flags(pcb, set_flags) do { (pcb)->flags = (u8_t)((pcb)->flags | (set_flags)); } while(0)
|
||||
#define udp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & ~(clr_flags)); } while(0)
|
||||
#define udp_clear_flags(pcb, clr_flags) do { (pcb)->flags = (u8_t)((pcb)->flags & (u8_t)(~(clr_flags) & 0xff)); } while(0)
|
||||
#define udp_is_flag_set(pcb, flag) (((pcb)->flags & (flag)) != 0)
|
||||
|
||||
/* The following functions are the lower layer interface to UDP. */
|
||||
|
Loading…
Reference in New Issue
Block a user