Summary: Cast increases required alignment warning in debug
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: ashesman
Submitted on: Wed 24 Jun 2020 05:12:42 AM UTC
Severity: 3 - Normal
Item Group: Compiler Warning
Assigned to: None
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.1
A very trivial thing but when enabling DNS_DEBUG, line 132 of netdb.c causes a
cast increases required alignment warning (or error in my case) due to the
cast of a char * to a ip_addr_t *. Here is a proposed (but untested) fix, it
is not the most efficient, but it is only debug output display.
In this case it can be guaranteed that there is not an alignment issue, so the
cast cannot cause a runtime error.