From: Borislav Petkov <bp@alien8.de>
To: linux-kbuild@vger.kernel.org
Cc: Paul Bolle <pebolle@tiscali.nl>, Sam Ravnborg <sam@ravnborg.org>,
lkml <linux-kernel@vger.kernel.org>, Michael Matz <matz@suse.de>,
x86-ml <x86@kernel.org>
Subject: Re: [PATCH] Kbuild: Move -Wmaybe-uninitialized to W=1
Date: Thu, 10 Jul 2014 12:42:23 +0200 [thread overview]
Message-ID: <20140710104223.GD2970@pd.tnic> (raw)
In-Reply-To: <20140708113724.GA27659@pd.tnic>
And,
I haven't even wished for it but just to prove everybody my point: just
built rc4+ from Linus' repo with gcc 4.9.0, see below.
Now all of a sudden there's more noise, maybe because this is a
different .config. However, I doubt those are real bugs.
A cursory look through those shows that they're not really bugs -
gcc simply can't know with all the ifdeffery, partial usage based on
conditionals, etc, etc.
---
In file included from scripts/sortextable.c:194:0:
scripts/sortextable.c: In function ‘main’:
scripts/sortextable.h:176:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: ‘relocs_size’ was declared here
int relocs_size;
^
In file included from scripts/sortextable.c:192:0:
scripts/sortextable.h:176:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: ‘relocs_size’ was declared here
int relocs_size;
^
fs/namespace.c: In function ‘SyS_mount’:
fs/namespace.c:2647:8: warning: ‘kernel_dev’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
^
fs/namespace.c:2626:8: note: ‘kernel_dev’ was declared here
char *kernel_dev;
^
fs/namespace.c:2647:8: warning: ‘kernel_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
^
fs/namespace.c:2624:8: note: ‘kernel_type’ was declared here
char *kernel_type;
^
fs/direct-io.c: In function ‘do_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;
^
In file included from include/net/inetpeer.h:15:0,
from net/ipv4/tcp_metrics.c:16:
net/ipv4/tcp_metrics.c: In function ‘tcp_peer_is_proven’:
include/net/ipv6.h:422:38: warning: ‘*((void *)&daddr+8)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;
^
net/ipv4/tcp_metrics.c:231:30: note: ‘*((void *)&daddr+8)’ was declared here
struct inetpeer_addr saddr, daddr;
^
In file included from include/net/inetpeer.h:15:0,
from net/ipv4/tcp_metrics.c:16:
include/net/ipv6.h:422:38: warning: ‘*((void *)&saddr+8)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;
^
net/ipv4/tcp_metrics.c:231:23: note: ‘*((void *)&saddr+8)’ was declared here
struct inetpeer_addr saddr, daddr;
^
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2014-07-10 10:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140710104223.GD2970@pd.tnic \
--to=bp@alien8.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matz@suse.de \
--cc=pebolle@tiscali.nl \
--cc=sam@ravnborg.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox