From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] Actually use retval
Date: Tue, 22 Mar 2011 19:20:14 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.1.00.1103221918540.1561@bonsai2> (raw)
In-Reply-To: <7v7hbrkovz.fsf@alter.siamese.dyndns.org>
Hi,
On Tue, 22 Mar 2011, Junio C Hamano wrote:
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>
> > This is most likely a bug. Nocited by gcc 4.6.0.
>
> While I don't doubt gcc 4.6.0 found the retval assigned is not used, I
> think you misunderstood the value returned from this function.
Nope. I did not misunderstand. I did not understand in the first place.
That is what I described pretty explicitly in the cover letter.
> The caller uses the return value to decide if an entry from t1 (and not
> from t2) was consumed, if an entry each from both t1 and t2 were
> consumed, or an entry from t2 (and not from t1) was consumed. It
> doesn't change the fact that the entry at the beginning of each tree we
> looked at in this function at that point shared the same name and we
> consumed them, whatever the call to diff_tree_sha1() to run a recursive
> comparison between the trees found.
>
> The likely fix would be to remove assignment to retval instead.
Thanks, that is the alternative I suggested after the dashdashdash.
Ciao,
Johannes
next prev parent reply other threads:[~2011-03-22 18:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 12:49 [PATCH 0/2] Fix issues found by gcc 4.6.0 Johannes Schindelin
2011-03-22 12:50 ` [PATCH 1/2] Remove unused variables Johannes Schindelin
2011-03-22 18:15 ` Junio C Hamano
2011-03-22 18:42 ` Johannes Schindelin
2011-03-22 19:43 ` Jonathan Nieder
2011-03-22 12:50 ` [PATCH 2/2] Actually use retval Johannes Schindelin
2011-03-22 18:10 ` Junio C Hamano
2011-03-22 18:20 ` Johannes Schindelin [this message]
2011-03-23 1:26 ` [PATCH 0/2] " Jonathan Nieder
2011-03-23 1:28 ` [PATCH 1/2] tree-diff: make diff_tree return void Jonathan Nieder
2011-03-23 1:30 ` [PATCH 2/2] tree-diff: make diff_tree_sha1 " Jonathan Nieder
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=alpine.DEB.1.00.1103221918540.1561@bonsai2 \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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