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

RE: Wunused-but-set-parameter warning in svn_wc_get_diff_editor6

From: Bert Huijben <bert_at_qqmail.nl>
Date: Fri, 22 Aug 2014 13:34:08 +0200

> -----Original Message-----
> From: Julian Foad [mailto:julianfoad_at_btopenworld.com]
> Sent: vrijdag 22 augustus 2014 12:52
> To: Philip Martin
> Cc: dev_at_subversion.apache.org; Bert Huijben
> Subject: Re: Wunused-but-set-parameter warning in
> svn_wc_get_diff_editor6
> Philip Martin wrote:
> > ../src/subversion/libsvn_wc/deprecated.c: In function
> > 'svn_wc_get_diff_editor6':
> > ../src/subversion/libsvn_wc/deprecated.c:1991:39: warning: parameter
> > 'ignore_ancestry' set but not used [-Wunused-but-set-parameter]
> >
> > It was added in 1569697.  Is this bit redundant or is something missing
> > from the compatibility function?
> Bert, Philip,
> There seems to be more than one problem in that function.
> The 'ignore_ancestry' flag should probably be passed to
> svn_wc__get_diff_editor(..., ignore-ancestry=ignore_ancestry, ...) instead
> of passing (..., ignore_ancestry=use_git_diff_format, ...). But then where
> should 'use_git_diff_format' be used?

The git_diff flag, triggers a lot of things... some of which require
noticing ancestry.

Instead of properly defining what this flag did, we just passed it around

With the new callback apis and filters, most of this was no longer

> The 'reverse' flag is used twice: once to construct a reversing filter
that will
> reverse the results; and then again the flag is passed to the diff
generator to
> tell it to generate reversed results. Wouldn't this cause a

The filter reverse the results, but there is one thing it can't do.

In some cases we have replacements...
Reported as a delete, followed by an add.

Just using the reverse filter would make this an add followed by a delete,
as it can't just reorder the callbacks.

That is why the driver still knows which reporting order it should use.

But it no longer contains an if in all places to report two ways... as it
used to do with the old implementation. The filter performs the translation
for all drivers.

> I haven't tried to debug it.
> - Julian
Received on 2014-08-22 13:34:45 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.