[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1387696 - /subversion/trunk/subversion/libsvn_wc/conflicts.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 11 Oct 2012 21:01:16 +0200

On Thu, Oct 11, 2012 at 12:20:32PM -0400, Hyrum K Wright wrote:
> > + /* Compute the incoming side of the conflict ('action'). */
> > + if (their_value == NULL)
> > + desc->action = svn_wc_conflict_action_delete;
> > + else if (my_value == NULL)
> > + desc->action = svn_wc_conflict_action_add;
>
> Wrong enum type assignment here, the source is an
> svn_wc_conflict_reason_t, but the destination is an
> svn_wc_conflict_action_t.

Really? I see neither svn_wc_conflict_action_delete nor
svn_wc_conflict_action_add in the definition of svn_wc_conflict_reason_t.

> While this might work now, it feels like a
> real opportunity for obscure bugs later. (And my compiler complains
> about it. :) )
>
> > + else
> > + desc->action = svn_wc_conflict_action_edit;
>
> Same.

Seems fine to me. Both are saying 'action'... did you mean to
quote a different part of the code?
Received on 2012-10-11 21:02:15 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.