-Wconversion (still far from finished) and other minor compilation fixes...

This commit is contained in:
goldsimon
2017-07-06 22:47:11 +02:00
parent 866d6c8637
commit f3c860958f
10 changed files with 89 additions and 66 deletions

View File

@@ -275,7 +275,7 @@
The best place to define this is the hooks file (@see LWIP_HOOK_FILENAME) */
#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__
#if HTTPD_LIMIT_SENDING_TO_2MSS
#define HTTPD_MAX_WRITE_LEN(pcb) (2 * altcp_mss(pcb))
#define HTTPD_MAX_WRITE_LEN(pcb) ((u16_t)(2 * altcp_mss(pcb)))
#endif
#endif

View File

@@ -443,7 +443,7 @@ struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg);
#define tcp_ack(pcb) \
do { \
if((pcb)->flags & TF_ACK_DELAY) { \
(pcb)->flags &= ~TF_ACK_DELAY; \
tcp_clear_flags((pcb), TF_ACK_DELAY); \
(pcb)->flags |= TF_ACK_NOW; \
} \
else { \

View File

@@ -390,11 +390,11 @@ struct in_pktinfo {
#define IOC_INOUT (IOC_IN|IOC_OUT)
/* 0x20000000 distinguishes new &
old ioctl's */
#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
#define _IO(x,y) ((long)(IOC_VOID|((x)<<8)|(y)))
#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define _IOR(x,y,t) ((long)(IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)))
#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define _IOW(x,y,t) ((long)(IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)))
#endif /* !defined(FIONREAD) || !defined(FIONBIO) */
#ifndef FIONREAD

View File

@@ -146,7 +146,7 @@ typedef err_t (*tcp_connected_fn)(void *arg, struct tcp_pcb *tpcb, err_t err);
/* Increments a tcpwnd_size_t and holds at max value rather than rollover */
#define TCP_WND_INC(wnd, inc) do { \
if ((tcpwnd_size_t)(wnd + inc) >= wnd) { \
wnd += inc; \
wnd = (tcpwnd_size_t)(wnd + inc); \
} else { \
wnd = (tcpwnd_size_t)-1; \
} \
@@ -257,9 +257,9 @@ struct tcp_pcb {
/* RTT (round trip time) estimation variables */
u32_t rttest; /* RTT estimate in 500ms ticks */
u32_t rtseq; /* sequence number being timed */
s16_t sa, sv; /* @todo document this */
s16_t sa, sv; /* @see "Congestion Avoidance and Control" by Van Jacobson and Karels */
s16_t rto; /* retransmission time-out */
s16_t rto; /* retransmission time-out (in ticks of TCP_SLOW_INTERVAL) */
u8_t nrtx; /* number of retransmissions */
/* fast retransmit/recovery */