From: Ingo Molnar <mingo@elte.hu>
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, dan.j.williams@intel.com,
tiwai@suse.de, linux-ext4@vger.kernel.org,
netdev@vger.kernel.org, linux-ide@vger.kernel.org,
bzolnier@gmail.com, marek.vasut@gmail.com, dwmw2@infradead.org,
mark.fasheh@oracle.com, ralf@linux-mips.org,
mchehab@infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: powerpc allmodconfig
Date: Fri, 17 Oct 2008 13:09:45 +0200 [thread overview]
Message-ID: <20081017110945.GA32364@elte.hu> (raw)
In-Reply-To: <20081015.220247.262683261.davem@davemloft.net>
* David Miller <davem@davemloft.net> wrote:
> > net/dccp/options.c: In function 'dccp_parse_options':
> > net/dccp/options.c:67: warning: 'value' may be used uninitialized in
> > this function
>
> Known issue, not trivial to fix, gcc is just being incredibly silly
> here as it can't see all of the control flow.
i just ran into this - do you have any objection against the patch
below?
Should we have a cleaner annotation perhaps instead of
uninitialized_var()? Something like:
#define __used __attribute__((used))
?
Ingo
---------->
From d917af0bd043eab40d57f79cba9cf7a7b265a205 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 17 Oct 2008 12:41:30 +0200
Subject: [PATCH] fix warning in net/dccp/options.c
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
fix this warning:
net/dccp/options.c: In function ‘dccp_parse_options’:
net/dccp/options.c:67: warning: ‘value’ may be used uninitialized in this function
This is a bogus GCC warning. The compiler does not recognize the relation
between "value" and "mandatory" variables: the code flow can ever reach
the "out_invalid_option:" label if 'mandatory' is set to 1, and when
'mandatory' is non-zero, we'll always have 'value' initialized.
Help out the compiler by annotating the variable.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
net/dccp/options.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 0809b63..18dcfb9 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -64,7 +64,7 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
(dh->dccph_doff * 4);
struct dccp_options_received *opt_recv = &dp->dccps_options_received;
unsigned char opt, len;
- unsigned char *value;
+ unsigned char *uninitialized_var(value);
u32 elapsed_time;
__be32 opt_val;
int rc;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-10-17 11:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 4:33 powerpc allmodconfig Andrew Morton
2008-10-16 4:56 ` Benjamin Herrenschmidt
2008-10-16 14:38 ` [PATCH] ibm_newemac: Fix new MAL feature handling Josh Boyer
2008-10-17 12:56 ` Arnd Bergmann
2008-10-17 13:09 ` Josh Boyer
2008-10-20 23:43 ` Benjamin Herrenschmidt
2008-10-21 5:17 ` Jeff Garzik
2008-10-16 5:02 ` powerpc allmodconfig David Miller
2008-10-16 6:08 ` Dan Williams
2008-10-16 6:55 ` Brice Goglin
2008-10-16 6:58 ` David Miller
2008-10-16 16:22 ` Jesse Brandeburg
2008-10-16 7:31 ` Geert Uytterhoeven
2008-10-16 7:36 ` David Miller
2008-10-16 7:58 ` Geert Uytterhoeven
2008-10-16 7:53 ` Andreas Schwab
[not found] ` <20081015.220247.262683261.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-10-16 5:21 ` Benjamin Herrenschmidt
2008-10-16 14:57 ` Johannes Berg
[not found] ` <1224169039.735.57.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-10-16 19:49 ` David Miller
2008-10-16 20:02 ` Arjan van de Ven
2008-10-18 12:20 ` Johannes Berg
2008-10-17 11:09 ` Ingo Molnar [this message]
2008-10-16 5:57 ` Takashi Iwai
2008-10-16 7:38 ` Adrian Bunk
2008-10-16 7:57 ` Takashi Iwai
2008-10-16 8:21 ` Adrian Bunk
[not found] ` <20081016082157.GC23630-re2QNgSbS3j4D6uPqz5PAwR5/fbUUdgG@public.gmane.org>
2008-10-16 8:43 ` Takashi Iwai
[not found] ` <s5hod1lorpm.wl%tiwai-l3A5Bk7waGM@public.gmane.org>
2008-10-16 10:03 ` Adrian Bunk
2008-10-16 9:34 ` Mark Brown
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=20081017110945.GA32364@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=bzolnier@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=marek.vasut@gmail.com \
--cc=mark.fasheh@oracle.com \
--cc=mchehab@infradead.org \
--cc=netdev@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).