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

Linus Torvalds
2017-06-06T16:32:38Z

On Tue, Jun 6, 2017 at 4:16 AM, Arnd Bergmann <arnd@arndb.de> 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