Dear All,
After spending some time trying to compile LwIP code, I've realised
that because the code quite often does not compile without warnings or even
errors (under GNU I set 'treat warnings as errors'), it must have
originally been compiled with minimum warning levels,or with a compiler which
isn't too fussy.
e.g. in raw.c (1.0.0) I get:
'error: conflicting types for `raw_recv'
and
'warning: assignment from incompatible pointer type' for the function
below (for the second parameter being passed)
void
raw_recv(struct raw_pcb
*pcb,
u8_t (* recv)(void
*arg, struct raw_pcb *upcb, struct pbuf
*p,
struct ip_addr *addr),
void *recv_arg)
{
/* remember recv() callback and user data
*/
pcb->recv = recv;
pcb->recv_arg =
recv_arg;
}
Prior to being posted to 'contrib' it should really have tested to
compile with strict ANSI checking.
I've got quite a few similar problems.
Questions:
1. Is the 'contrib' code supposed to be 'clean'?
2. What does everyone think about strict ANSI checking?
Best Regards
Jan
ALL-NEW Yahoo!
Messenger - all new features - even more
fun!