lkml.org 
[lkml]   [2019]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] objtool: Don't use -Werror
On Fri, Apr 05, 2019 at 09:39:26AM -0500, Josh Poimboeuf wrote:

> Hm, I would actually argue the reverse. Warnings are generally bad and
> -Werror is useful for ensuring that we don't have any. For warnings
> that don't provide value, we just disable those individual warnings.

Sure, during development it's an excellent idea to investigate compiler
warnings, and -Werror can be useful for that. But the Linux kernel is
built by countless users in wildly varying environments, and it's almost
a given that someone will use a compiler that'll complain about a valid
part of your code whose style it considers bad.

As an example, the warning that's breaking the build for me is -Wundef
complaining about several "#if UNDEFINED_IDENTIFIER" constructs in the
libelf headers. (I agree with gcc in considering this bad style, but
it's perfectly valid C, and there probably wasn't a warning about it
back when this header was written.)

Regards,
Luis

\
 
 \ /
  Last update: 2019-04-05 18:06    [W:0.051 / U:0.852 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site