[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: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 22 Aug 2014 13:00:36 +0100

"Bert Huijben" <bert_at_qqmail.nl> writes:

>> 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
> everywhere.
>
> With the new callback apis and filters, most of this was no longer
> necessary.

If the current code is correct then we should remove the redundant
assignment to ignore_ancestry and make it an unused parameter.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-08-22 14:01:06 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.