Re: Purpose of "struct object_entry *oe = oe;"?
- From
David Aguilar <davvid@gmail.com>
- Date
- Jul 2, 2010, 08:48 UTC
- Message-ID
- <20100702084846.GA4682@gmail.com>
- In-Reply-To
- <8039w681lo.fsf@tiny.isode.net>
On Tue, Jun 29, 2010 at 01:28:19PM +0100, Bruce Stephens wrote:
Show 16 quoted lines
> Out of curiousity, where did this convention/idiom come from, and what's
> it for?
>
> I presume it's to remove a warning ("oe might be used uninitialised") on
> a compiler (or something) that's clever enough to attempt such analysis
> but too stupid to notice that the supposed initialisation is using
> something uninitialised (or perhaps the compiler's deliberately
> recognising the convention?). Is that right, or does it actually do
> something more?
>
> I'm mostly surprised that it surprises me. Is it used commonly in other
> projects? (It appears not to be mentioned in CodingGuidelines; should
> it be?)
>
> (First instance in git that I can see is
> 67affd5173da059ca60aab7896985331acacd9b4, 2006.)There are some good explanations in the list archives. http://thread.gmane.org/gmane.comp.version-control.git/133278/focus=133422 http://thread.gmane.org/gmane.comp.version-control.git/124676/focus=124803
-- David