Re: [PATCH v3 1/2] kbuild: refactor scripts/Makefile.extrawarn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 31, 2019 at 6:26 PM Masahiro Yamada
<yamada.masahiro@xxxxxxxxxxxxx> wrote:

> +# Some diagnostics enabled by default are noisy.
> +# Suppress them by using -Wno... except for W=1.
> +
>  ifdef CONFIG_CC_IS_CLANG
>  KBUILD_CFLAGS += -Wno-initializer-overrides
>  KBUILD_CFLAGS += -Wno-format
>  KBUILD_CFLAGS += -Wno-sign-compare
>  KBUILD_CFLAGS += -Wno-format-zero-length
>  endif

FWIW, I just found out I missed a bug that clang failed to warn about
because of the  -Wno-format. Apparently gcc warns only about type
mismatches that result in incompatible calling conventions (e.g.
int vs int64_t) but not smaller types (int, short) that get converted to an
int anyway. Passing -Wno-format turns both off.

      Arnd



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux