Added some ASSERTS and casts to prevent warnings when assigning to smaller types.

This commit is contained in:
goldsimon
2007-07-02 20:13:45 +00:00
parent 0113b735ad
commit fa4b711495
5 changed files with 36 additions and 22 deletions

View File

@@ -292,10 +292,10 @@ struct tcp_pcb {
u16_t ssthresh;
/* sender variables */
u32_t snd_nxt, /* next seqno to be sent */
snd_max, /* Highest seqno sent. */
snd_wnd, /* sender window */
snd_wl1, snd_wl2, /* Sequence and acknowledgement numbers of last
u32_t snd_nxt, /* next seqno to be sent */
snd_max; /* Highest seqno sent. */
u16_t snd_wnd; /* sender window */
u32_t snd_wl1, snd_wl2, /* Sequence and acknowledgement numbers of last
window update. */
snd_lbb; /* Sequence number of next byte to be buffered. */
@@ -587,6 +587,12 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
} while(0)
#endif /* LWIP_DEBUG */
/* finally, check some defines */
#if TCP_WND > 0xffff
#error TCP_WND must fit in an u16_t
#endif
#ifdef __cplusplus
}
#endif