git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 2/2] Fix variable initialization in insert_packed_refs().
Date: Fri, 15 Jan 2010 12:02:38 +0100	[thread overview]
Message-ID: <201001151202.38762.richard@nod.at> (raw)
In-Reply-To: <4B501A9D.6060703@viscovery.net>

Am Freitag 15 Januar 2010 08:34:53 schrieb Johannes Sixt:
> If you look around in the code, you'll find more *cough* initializations
> *cough* like this. They are written this way for a reason: they avoid
> unwarranted compiler warnings "'foo' may be used uninitialized". Are you
> saying that this warning is not triggered anymore after your change?
> 

I don't get a warning after my change. 
But I'm using on this system a quite old gcc (4.3.1).
I'll recompile git with a more recent gcc and see what happens.

Just for clarification:
"int cmp = cmp;"
*suppresses* only the warning but "cmp" is still uninitialized?
(I did'nt know this trick before.)

//richard

      reply	other threads:[~2010-01-15 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-14 23:29 [PATCH 2/2] Fix variable initialization in insert_packed_refs() Richard Weinberger
2010-01-15  7:34 ` Johannes Sixt
2010-01-15 11:02   ` Richard Weinberger [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=201001151202.38762.richard@nod.at \
    --to=richard@nod.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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).