[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: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 22 Aug 2014 11:52:02 +0100

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 '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 double-reversal?

I haven't tried to debug it.

- Julian
Received on 2014-08-22 12:59:14 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.