Re: svn commit: r1665853 - /subversion/trunk/subversion/libsvn_diff/diff_file.c
This resolves several signed compared to unsigned warnings on Windows.
It is nice to fix warnings for some favorite compiler, but there are still > 200 warnings left on Windows, especially on cases that assume int and size_t variants have identical length, which doesn’t hold on Win64.
Sent from Windows Mail
From: Branko Čibej
Sent: Thursday, March 12, 2015 4:59 AM
To: 'Subversion Development'
On 11.03.2015 13:02, rhuijben_at_apache.org wrote:
> Author: rhuijben
> Date: Wed Mar 11 12:02:50 2015
> New Revision: 1665853
> URL: http://svn.apache.org/r1665853
> * subversion/libsvn_diff/diff_file.c
> (svn_diff3__file_output_baton_t): Use apr_size_t to avoid some warnings,
> on usages of this variable.
> Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1665853&r1=1665852&r2=1665853&view=diff
> --- subversion/trunk/subversion/libsvn_diff/diff_file.c (original)
> +++ subversion/trunk/subversion/libsvn_diff/diff_file.c Wed Mar 11 12:02:50 2015
> @@ -1998,7 +1998,7 @@ typedef struct svn_diff3__file_output_ba
> const char *marker_eol;
> svn_diff_conflict_display_style_t conflict_style;
> - int context_size;
> + apr_size_t context_size;
> /* cancel support */
> svn_cancel_func_t cancel_func;
I don't know what kind of warnings you're avoiding here, but I saw none
in maintainer mode before this commit, and now I'm getting this:
subversion/libsvn_diff/diff_file.c:2051:27: warning: implicit conversion loses integer precision:
'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
cs->context_size = fob->context_size;
1 warning generated.
Received on 2015-03-12 08:56:05 CET
This is an archived mail posted to the Subversion Dev