linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Turn off -Wmaybe-uninitialized completely and move it to W=1
@ 2014-06-16 13:20 Borislav Petkov
  2014-06-16 21:14 ` Sam Ravnborg
  0 siblings, 1 reply; 22+ messages in thread
From: Borislav Petkov @ 2014-06-16 13:20 UTC (permalink / raw)
  To: lkml; +Cc: Michael Matz, linux-kbuild, x86-ml

Hi,

so 3.16-rc1 adds this false positive from gcc, see below (triggers on
4.9 and 4.8.2). Now, it is firing wrong and gcc people tell me there's
no way for the compiler to know that the "from" and "to" values will NOT
be used in the error case, i.e. thus the "maybe" aspect.

So, we've disabled it for -Os already:

	e74fc973b6e5 ("Turn off -Wmaybe-uninitialized when building with -Os")

maybe we want to disable it by default on all and move it to W=1. This
way people can still have it fire but not by default. And from what I've
seen so far, it is mostly firing wrong and it is becoming annoying.

So what do people think, any reasons for keeping it enabled by default?

Thanks.

---

fs/direct-io.c: In function ‘__blockdev_direct_IO’:
fs/direct-io.c:920:9: warning: ‘to’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   while (from < to) {
         ^
fs/direct-io.c:913:16: note: ‘to’ was declared here
   size_t from, to;
                ^
fs/direct-io.c:1034:9: warning: ‘from’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    from += this_chunk_bytes;
         ^
fs/direct-io.c:913:10: note: ‘from’ was declared here
   size_t from, to;


-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-07-29 18:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-16 13:20 [RFC] Turn off -Wmaybe-uninitialized completely and move it to W=1 Borislav Petkov
2014-06-16 21:14 ` Sam Ravnborg
2014-06-24 21:38   ` [PATCH] Kbuild: Move -Wmaybe-uninitialized " Borislav Petkov
2014-07-07 10:53     ` Borislav Petkov
2014-07-08  9:25       ` Paul Bolle
2014-07-08 11:37         ` Borislav Petkov
2014-07-10 10:42           ` Borislav Petkov
2014-07-10 11:03             ` Paul Bolle
2016-07-28  4:20       ` Borislav Petkov
2016-07-28  8:29         ` Ingo Molnar
2016-07-28  8:46           ` Borislav Petkov
2016-07-28 16:49             ` Ingo Molnar
2016-07-28 17:04               ` Ingo Molnar
2016-07-28 17:56             ` Markus Trippelsdorf
2016-07-28 19:03           ` Linus Torvalds
2016-07-28 19:08             ` Linus Torvalds
2016-07-28 20:28               ` Ingo Molnar
2016-07-28 21:22             ` Linus Torvalds
2016-07-29 10:08               ` Arnd Bergmann
2016-07-29 10:19                 ` Borislav Petkov
2016-07-29 10:35                   ` Arnd Bergmann
2016-07-29 18:26                   ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).