lkml.org 
[lkml]   [2018]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V2] auxdisplay: use correct string length
On Tue, Feb 13, 2018 at 8:23 AM, Willy Tarreau <w@1wt.eu> wrote:
> On Tue, Feb 13, 2018 at 09:19:21AM +0800, Xiongfeng Wang wrote:

>> This may suppress the gcc warning.
>
> In fact there are two big problems with gcc warnings :
> - writing -Wno-something-unknown triggers an error on versions where
> "something-unknown" isn't known, making it difficult to permanently
> disable warnings (though in the kernel we handle this pretty fine)

We have the $(call cc-disable-warning) helper for this.

> - warnings and diagnostics are conflated. Some warnings should only be
> provided when the developer explicitly asks for suspicious stuff
> (-Wsecurity, -Wsuspicious, etc) that would *not* be part of -Wall
> since -Wall is usually used to report real warnings.

And this is what the W=1 and W=2 make options are for.

I originally asked Xiongfeng to look at some of the new gcc-8 warnings,
but must have miscommunicated at some point. I think we do want to
enable the new -Wstringop-overflow warnings by default and fix all
instances, including the false-positive ones. This is a useful warning
because it tells you when you actually write past a buffer, e.g. using
strcpy() with a source string that is longer than the destination.

For -Wstringop-truncation, we can decide whether it should be W=1
or W=2, but I'd still make it possible for users and maintainers to
easily enable the warning when test building new code.

Arnd

\
 
 \ /
  Last update: 2018-02-13 09:28    [W:0.052 / U:9.696 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site