From: Arnd Bergmann <arnd@arndb.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] GCC4 cleanup question
Date: Mon, 30 May 2005 08:33:08 +0000 [thread overview]
Message-ID: <200505301033.08717.arnd@arndb.de> (raw)
In-Reply-To: <4297ECD9.2060505@gmail.com>
On Sünnavend 28 Mai 2005 08:25, Bongani Hlope wrote:
> I don't have GCC4, the first rth is initialised inside the __mkroute_input
> function and the second one is initialised in the __mkroute_output function.
> I don't know why gcc is giving those warings.
__mkroute_{in,out}put does not initialize *result if it returns early.
> --- net/ipv4/route.c.old 2005-05-18 21:18:19.000000000 +0200
> +++ net/ipv4/route.c 2005-05-28 08:23:18.000000000 +0200
> @@ -1767,7 +1767,7 @@ static inline int ip_mkroute_input_def(s
> struct in_device *in_dev,
> u32 daddr, u32 saddr, u32 tos)
> {
> - struct rtable* rth;
> + struct rtable* rth = NULL;
> int err;
> unsigned hash;
>
We've already had that discussion. Don't initialize it to a bogus value
in the declaration, but make sure it always gets set in the function
that is responsible for initializing it (__mkroute_input in this case).
Arnd <><
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
prev parent reply other threads:[~2005-05-30 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-28 4:00 [KJ] GCC4 cleanup question Chuck Short
2005-05-28 6:25 ` Bongani Hlope
2005-05-29 15:44 ` Ricardo Nabinger Sanchez
2005-05-30 8:33 ` Arnd Bergmann [this message]
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=200505301033.08717.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=kernel-janitors@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.