ipv4: Fix new GCC 6 strict-aliasing errors
The new version of the GCC compiler complains about an inline cast: In file included from /usr/include/string.h:630:0, from src/ipv4.c:22: src/ipv4.c: In function ‘ipv4_show_route’: src/ipv4.h:62:12: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] (((struct sockaddr_in *) &(route)->rt_dst)->sin_addr) ^ src/ipv4.c:42:39: note: in expansion of macro ‘route_dest’ strncat(show_route_buffer, inet_ntoa(route_dest(route)), 15); ^~~~~~~~~~ This commit introduces a dummy function to get rid of these errors.
Loading
Please register or sign in to comment