You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/05/09 19:58:14 UTC

Re: svn commit: r1101102 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/patch.c svn/notify.c

On May 9, 2011 12:36 PM, <st...@apache.org> wrote:
>
> Author: stefan2
> Date: Mon May  9 16:36:28 2011
> New Revision: 1101102
>
> URL: http://svn.apache.org/viewvc?rev=1101102&view=rev
> Log:
> Fix conversion and signedness comparison warnings concerning the "fuzz"
> factor. That value is non-negative, thus we can use the same type as for
> the values that we combine or compare it with.
>
> * subversion/include/svn_wc.h
>  (svn_wc_notify_t): make hunk_fuzz a "number of lines"
> * subversion/libsvn_client/patch.c
>  (hunk_info_t, match_hunk, scan_for_match, get_hunk_info,
apply_one_patch):
>   make all fuzz values a "number of lines"
> * subversion/svn/notify.c
>  (notify): adapt format strings

Isn't this kinda like using a time type to hold duration? :-P

Cheers,
-g

Re: svn commit: r1101102 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/patch.c svn/notify.c

Posted by Greg Stein <gs...@gmail.com>.
On May 10, 2011 4:39 AM, "Stefan Fuhrmann" <eq...@web.de> wrote:
>
> On 09.05.2011 19:58, Greg Stein wrote:
>>
>> On May 9, 2011 12:36 PM,<st...@apache.org>  wrote:
>>>
>>> Author: stefan2
>>> Date: Mon May  9 16:36:28 2011
>>> New Revision: 1101102
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1101102&view=rev
>>> Log:
>>> Fix conversion and signedness comparison warnings concerning the "fuzz"
>>> factor. That value is non-negative, thus we can use the same type as for
>>> the values that we combine or compare it with.
>>>
>>> * subversion/include/svn_wc.h
>>>  (svn_wc_notify_t): make hunk_fuzz a "number of lines"
>>> * subversion/libsvn_client/patch.c
>>>  (hunk_info_t, match_hunk, scan_for_match, get_hunk_info,
>>
>> apply_one_patch):
>>>
>>>   make all fuzz values a "number of lines"
>>> * subversion/svn/notify.c
>>>  (notify): adapt format strings
>>
>> Isn't this kinda like using a time type to hold duration? :-P
>>
> It's at least close to it and I noticed that when I wrote the code ;)
> Now that I think of it, the real solution would be introducing a
> svn_linefuzz_t that is equivalent to svn_linenum_t. Please note
> that svn_linediff_t would be wrong since the "fuzz" value cannot
> be negative.

Don't get me wrong... I'm having fun, rather than being pedantic :-)

Cheers,
-g

Re: svn commit: r1101102 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/patch.c svn/notify.c

Posted by Stefan Fuhrmann <eq...@web.de>.
On 09.05.2011 19:58, Greg Stein wrote:
> On May 9, 2011 12:36 PM,<st...@apache.org>  wrote:
>> Author: stefan2
>> Date: Mon May  9 16:36:28 2011
>> New Revision: 1101102
>>
>> URL: http://svn.apache.org/viewvc?rev=1101102&view=rev
>> Log:
>> Fix conversion and signedness comparison warnings concerning the "fuzz"
>> factor. That value is non-negative, thus we can use the same type as for
>> the values that we combine or compare it with.
>>
>> * subversion/include/svn_wc.h
>>   (svn_wc_notify_t): make hunk_fuzz a "number of lines"
>> * subversion/libsvn_client/patch.c
>>   (hunk_info_t, match_hunk, scan_for_match, get_hunk_info,
> apply_one_patch):
>>    make all fuzz values a "number of lines"
>> * subversion/svn/notify.c
>>   (notify): adapt format strings
> Isn't this kinda like using a time type to hold duration? :-P
>
It's at least close to it and I noticed that when I wrote the code ;)
Now that I think of it, the real solution would be introducing a
svn_linefuzz_t that is equivalent to svn_linenum_t. Please note
that svn_linediff_t would be wrong since the "fuzz" value cannot
be negative.

-- Stefan^2.