lkml.org 
[lkml]   [2017]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC] clang: 'unused-function' warning on static inline functions
On Tue, Jun 6, 2017 at 2:23 PM, Matthias Kaehlcke <mka@chromium.org> wrote:
>
> I tend to disagree, the warning is useful to detect truly unused
> static inline functions, which should be removed, rather than be
> carried around/maintained for often long periods of time.

That may be true in other projects, but we really do have a lot of
code that is conditionally used. The warning is just not useful.

I agree that we could use "__maybe_unused", but at the same time, I
don't really see the point. There's no way in hell we'd ever do that
for inlines that are in header files (*of course* they may be unused),
why would we then haev a magical rule like "let's do it for inlines in
C files".

I applied the patch from David Rientjes to just make "inline"
automatically mean "maybe unused" for clang.

Linus

\
 
 \ /
  Last update: 2017-06-12 00:56    [W:0.094 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site