Re: [PATCH 2/2] Actually use retval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 22 Mar 2011, Junio C Hamano wrote:

> Johannes Schindelin <johannes.schindelin@xxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]