• Arnd Bergmann's avatar
    Makefile.extrawarn: move -Wcast-align to W=3 · 095fbca0
    Arnd Bergmann authored
    This warning behaves differently depending on the architecture
    and compiler. Using x86 gcc, we get no output at all because
    gcc knows the architecture can handle unaligned accesses.
    
    Using x86 clang, or gcc on an architecture that needs to
    manually deal with unaligned accesses, the build log is
    completely flooded with these warnings, as they are commonly
    invoked by inline functions of networking headers, e.g.
    
    include/linux/skbuff.h:1426:26: warning: cast increases required alignment of target type [-Wcast-align]
    
    The compiler is correct to point this out, as we are dealing
    with undefined behavior that does cause problems in practice,
    but there is also no good way to rewrite the code in commonly
    included headers to a safer method.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    095fbca0
Makefile.extrawarn 2.8 KB