New code from lwip project

lwip repo:
54d4d9a Fix warning for compilers propagating ~'ed u8_t to int...