Re: [RFC] clang: 'unused-function' warning on static inline functions

From: Linus Torvalds
Date: Tue Jun 06 2017 - 12:32:40 EST


On Tue, Jun 6, 2017 at 4:16 AM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> Those should all be fairly easy to address, I'd vote for leaving the
> warning enabled
> in clang, and possibly asking the gcc maintainers to add a similar feature for
> warning about it.

Hell no. That warning is pointless shit.

The function is inlined. If it's not used, why the f*ck should you get
a warning? Just to add more pointless #ifdef'fery around a function
that is perhaps only used under certain circumstances?

No. That warning is garbage, and we will ignore it, and we sure as
hell will not ask gcc to add more garbage warnings.

Linus