Skip to content

Fix clang cast alignment warning

Avinash Sonawane requested to merge (removed):clang-warning into master

Hello!

On latest git master, clang throws following warning:

net.c:245:12: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 2 to 4 [-Wcast-align]
    p_sa = (struct sockaddr_in*) &ifr.ifr_addr;
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch fixes the warning.

Merge request reports

Loading