git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bruce Stephens <bruce.stephens@isode.com>
To: git@vger.kernel.org
Subject: Purpose of "struct object_entry *oe = oe;"?
Date: Tue, 29 Jun 2010 13:28:19 +0100	[thread overview]
Message-ID: <8039w681lo.fsf@tiny.isode.net> (raw)

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.)

             reply	other threads:[~2010-06-29 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 12:28 Bruce Stephens [this message]
2010-07-02  1:43 ` Purpose of "struct object_entry *oe = oe;"? Joshua Juran
2010-07-02  8:48 ` David Aguilar
2010-07-02  9:28   ` Bruce Stephens

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8039w681lo.fsf@tiny.isode.net \
    --to=bruce.stephens@isode.com \
    --cc=git@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).