From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: brian.haley@hp.com, marcel@holtmann.org, netdev@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] netlink: silence compiler warning
Date: Sat, 05 Sep 2009 09:52:40 +0200 [thread overview]
Message-ID: <4AA218C8.4050800@gmail.com> (raw)
In-Reply-To: <20090904.203318.112406812.davem@davemloft.net>
David Miller wrote, On 09/05/2009 05:33 AM:
> From: Brian Haley <brian.haley@hp.com>
> Date: Fri, 04 Sep 2009 21:36:06 -0400
>
>> Hi Marcel,
>>
>> Marcel Holtmann wrote:
>>> can we please add the err = -E... where it actually is needed and not
>>> stupidly go ahead and silence compiler warnings with err = 0. This has
>>> been posted before.
>> Sorry, I don't remember it being posted before. If you look at the code
>> though, err is correctly initialized, gcc just can't figure it out. The
>> choices I see are either what I originally posted, using uninitialized_var(err),
>> or the patch below. It doesn't matter to me.
>
> uninitialized_var() would be absolutely wrong here, as then we'd
> return garbage if such a path were actually possible.
If the main "thesis" of the patch is:
> From following the code 'err' is initialized, but set it to zero to
> silence the warning.
"we" should better be sure it "is initialized", so considering: "if such
a path were actually possible" "would be absolutely wrong here"...
Here is a link to the message which proved something else was possible
at some moment in -next (I didn't check the current code yet):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] Fix Warnings from net/netlink/genetlink.c
Date: Wed, 12 Aug 2009 13:50:31 +1000
Archived-At: http://permalink.gmane.org/gmane.linux.kernel.next/8786
Jarek P.
next prev parent reply other threads:[~2009-09-05 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-05 0:55 [PATCH] netlink: silence compiler warning Brian Haley
2009-09-05 1:08 ` Marcel Holtmann
2009-09-05 1:36 ` Brian Haley
2009-09-05 3:33 ` David Miller
2009-09-05 7:52 ` Jarek Poplawski [this message]
2009-09-05 8:13 ` David Miller
2009-09-05 3:32 ` David Miller
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=4AA218C8.4050800@gmail.com \
--to=jarkao2@gmail.com \
--cc=brian.haley@hp.com \
--cc=davem@davemloft.net \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).