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

Re: svn commit: r1872108 - /subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c

From: Branko Čibej <brane_at_apache.org>
Date: Mon, 30 Dec 2019 14:05:50 +0100

On 30.12.2019 13:24, julianfoad_at_apache.org wrote:
> Author: julianfoad
> Date: Mon Dec 30 12:24:50 2019
> New Revision: 1872108
>
> URL: http://svn.apache.org/viewvc?rev=1872108&view=rev
> Log:
> Avoid integer conversion warning. A follow-up to r1872107.
>
> * subversion/tests/libsvn_subr/mergeinfo-test.c
> (rangelist_to_array): Add explicit casts.
>
> Modified:
> subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
>
> Modified: subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1872108&r1=1872107&r2=1872108&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
> +++ subversion/trunk/subversion/tests/libsvn_subr/mergeinfo-test.c Mon Dec 30 12:24:50 2019
> @@ -1841,7 +1841,7 @@ rangelist_to_array(rl_array_t *a,
> svn_merge_range_t *range = APR_ARRAY_IDX(rl, i, svn_merge_range_t *);
> int r;
>
> - for (r = range->start + 1; r <= range->end; r++)
> + for (r = (int)range->start + 1; r <= (int)range->end; r++)
> {
> a->root[r] = TRUE;
> a->inherit[r] = range->inheritable;

I really don't like this kind if papering over warnings with typecasts.
Instead, change the type of 'r' to match the types of 'range->start' and
'range->end'.

Yes I know this is just a test helper function.

-- Brane
Received on 2019-12-30 14:05:54 CET

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.