You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@apache.org> on 2016/11/11 13:30:24 UTC
New warnings on trunk on OSX
In case anyone is interested:
/Users/brane/src/svn/repos/trunk/subversion/libsvn_fs_x/changes.c:243:29: warning: implicit conversion loses integer precision:
'unsigned long' to 'int' [-Wshorten-64-to-32]
first = MIN(context->next + list_first, list_last);
~ ~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/brane/src/svn/repos/trunk/subversion/include/svn_sorts.h:43:33: note: expanded from macro 'MIN'
#define MIN(a, b) ((a) < (b) ? (a) : (b))
^
/Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:745:42: warning: implicit conversion loses integer precision:
'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
*options = apr_array_make(result_pool, nopt, sizeof(client_option_t *));
~~~~~~~~~~~~~~ ^~~~
/Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:1205:42: warning: implicit conversion loses integer precision:
'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
*options = apr_array_make(result_pool, nopt, sizeof(client_option_t *));
~~~~~~~~~~~~~~ ^~~~
/Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:1456:42: warning: implicit conversion loses integer precision:
'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
*options = apr_array_make(result_pool, nopt, sizeof(client_option_t *));
~~~~~~~~~~~~~~ ^~~~
/Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:1618:37: warning: implicit conversion loses integer precision:
'long long' to 'int' [-Wshorten-64-to-32]
*preferred_move_target_idx = (idx - 1);
~ ~~~~^~~
/Users/brane/src/svn/repos/trunk/subversion/svnserve/serve.c:3622:40: warning: implicit conversion loses integer precision:
'apr_uint64_t' (aka 'unsigned long long') to 'apr_uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
rb.dirent_fields, pool)));
~~~^~~~~~~~~~~~~
/Users/brane/src/svn/repos/trunk/subversion/include/svn_error.h:353:35: note: expanded from macro 'SVN_ERR'
svn_error_t *svn_err__temp = (expr); \
^~~~
Re: New warnings on trunk on OSX
Posted by Stefan Fuhrmann <st...@apache.org>.
On 11.11.2016 14:30, Branko \u010cibej wrote:
> In case anyone is interested:
>
> /Users/brane/src/svn/repos/trunk/subversion/libsvn_fs_x/changes.c:243:29: warning: implicit conversion loses integer precision:
> 'unsigned long' to 'int' [-Wshorten-64-to-32]
> first = MIN(context->next + list_first, list_last);
> ~ ~~~~~~~~~~~~~~^~~~~~~~~~~~
> /Users/brane/src/svn/repos/trunk/subversion/include/svn_sorts.h:43:33: note: expanded from macro 'MIN'
> #define MIN(a, b) ((a) < (b) ? (a) : (b))
> ^
> /Users/brane/src/svn/repos/trunk/subversion/svnserve/serve.c:3622:40: warning: implicit conversion loses integer precision:
> 'apr_uint64_t' (aka 'unsigned long long') to 'apr_uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
> rb.dirent_fields, pool)));
> ~~~^~~~~~~~~~~~~
> /Users/brane/src/svn/repos/trunk/subversion/include/svn_error.h:353:35: note: expanded from macro 'SVN_ERR'
> svn_error_t *svn_err__temp = (expr); \
> ^~~~
These should be fixed by r1769532.
> /Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:745:42: warning: implicit conversion loses integer precision:
> 'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
> *options = apr_array_make(result_pool, nopt, sizeof(client_option_t *));
> ~~~~~~~~~~~~~~ ^~~~
> /Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:1205:42: warning: implicit conversion loses integer precision:
> 'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
> *options = apr_array_make(result_pool, nopt, sizeof(client_option_t *));
> ~~~~~~~~~~~~~~ ^~~~
> /Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:1456:42: warning: implicit conversion loses integer precision:
> 'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
> *options = apr_array_make(result_pool, nopt, sizeof(client_option_t *));
> ~~~~~~~~~~~~~~ ^~~~
> /Users/brane/src/svn/repos/trunk/subversion/svn/conflict-callbacks.c:1618:37: warning: implicit conversion loses integer precision:
> 'long long' to 'int' [-Wshorten-64-to-32]
> *preferred_move_target_idx = (idx - 1);
> ~ ~~~~^~~
Those are basically caused by the ARRAY_LEN macro
returning an apr_size_t. We could make it return an
int because all those arrays are static and small-ish.
But I doesn't feel like the obvious solution.
-- Stefan^2.