lkml.org 
[lkml]   [2017]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] compiler, clang: move inline definition to compiler-gcc.h
El Tue, Jun 06, 2017 at 10:56:49PM -0700 David Rientjes ha dit:

> The motivation of commit abb2ea7dfd82 ("compiler, clang: suppress warning
> for unused static inline functions") is to suppress clang's warnings about
> unused static inline functions.
>
> Clang defines __GNUC__ so it inherits all of compiler-gcc.h as well, so
> the redefinition of `inline' ends up overriding the definition in
> compiler-gcc.h.
>
> Simply annotate all inline functions as __attribute__((unused)). It's
> necessary to suppress the warning for clang and is implicit with gcc.
>
> Reported-by: Matthias Kaehlcke <mka@chromium.org>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---

Tested-by: Matthias Kaehlcke <mka@chromium.org>

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