Re: [PATCH] kbuild: enable unused-function warnings for W= build with Clang

2019-08-19 Thread Nathan Chancellor
On Tue, Aug 20, 2019 at 01:58:26AM +0900, Masahiro Yamada wrote: > Hi Nathan, > > On Tue, Aug 20, 2019 at 1:09 AM Nathan Chancellor > wrote: > > > > On Mon, Aug 19, 2019 at 07:51:38PM +0900, Masahiro Yamada wrote: > > > GCC and Clang have different policy for -Wunused-function; GCC does > > >

Re: [PATCH] kbuild: enable unused-function warnings for W= build with Clang

2019-08-19 Thread Masahiro Yamada
Hi Nathan, On Tue, Aug 20, 2019 at 1:09 AM Nathan Chancellor wrote: > > On Mon, Aug 19, 2019 at 07:51:38PM +0900, Masahiro Yamada wrote: > > GCC and Clang have different policy for -Wunused-function; GCC does > > not report unused-function warnings at all for the functions marked > > as 'static

Re: [PATCH] kbuild: enable unused-function warnings for W= build with Clang

2019-08-19 Thread Kees Cook
On Mon, Aug 19, 2019 at 07:51:38PM +0900, Masahiro Yamada wrote: > GCC and Clang have different policy for -Wunused-function; GCC does > not report unused-function warnings at all for the functions marked > as 'static inline'. Clang does report unused-function warnings if they > are defined in

Re: [PATCH] kbuild: enable unused-function warnings for W= build with Clang

2019-08-19 Thread Nathan Chancellor
On Mon, Aug 19, 2019 at 07:51:38PM +0900, Masahiro Yamada wrote: > GCC and Clang have different policy for -Wunused-function; GCC does > not report unused-function warnings at all for the functions marked > as 'static inline'. Clang does report unused-function warnings if they > are defined in

[PATCH] kbuild: enable unused-function warnings for W= build with Clang

2019-08-19 Thread Masahiro Yamada
GCC and Clang have different policy for -Wunused-function; GCC does not report unused-function warnings at all for the functions marked as 'static inline'. Clang does report unused-function warnings if they are defined in source files instead of headers. We could use Clang for detecting unused