[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AA218C8.4050800@gmail.com>
Date: Sat, 05 Sep 2009 09:52:40 +0200
From: Jarek Poplawski <jarkao2@...il.com>
To: David Miller <davem@...emloft.net>
CC: brian.haley@...com, marcel@...tmann.org, netdev@...r.kernel.org,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH] netlink: silence compiler warning
David Miller wrote, On 09/05/2009 05:33 AM:
> From: Brian Haley <brian.haley@...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@...b.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists