You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2017/01/29 15:51:03 UTC
svn commit: r1780815 - in /subversion/trunk/subversion:
libsvn_client/conflicts.c svn/conflict-callbacks.c
Author: brane
Date: Sun Jan 29 15:51:03 2017
New Revision: 1780815
URL: http://svn.apache.org/viewvc?rev=1780815&view=rev
Log:
Fix compiler warnings.
* subversion/libsvn_client/conflicts.c (map_deleted_path_to_move):
Use the correct type of local variable to avoid narrowing warnings.
* subversion/svn/conflict-callbacks.c
(build_text_conflict_options,
build_prop_conflict_options,
build_tree_conflict_options): Likewise.
(prompt_move_target_path): Check returned index range and cast it
to the target type to avoid a narrowing warning.
Modified:
subversion/trunk/subversion/libsvn_client/conflicts.c
subversion/trunk/subversion/svn/conflict-callbacks.c
Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1780815&r1=1780814&r2=1780815&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Sun Jan 29 15:51:03 2017
@@ -577,9 +577,9 @@ map_deleted_path_to_move(const char *del
apr_array_header_t *moves,
apr_pool_t *scratch_pool)
{
- int i;
struct repos_move_info *closest_move = NULL;
- int min_components = 0;
+ apr_size_t min_components = 0;
+ int i;
for (i = 0; i < moves->nelts; i++)
{
@@ -595,7 +595,7 @@ map_deleted_path_to_move(const char *del
if (relpath)
{
/* This could be a nested move. Return the path-wise closest move. */
- int c = svn_path_component_count(relpath);
+ const apr_size_t c = svn_path_component_count(relpath);
if (c == 0)
return move;
else if (min_components == 0 || c < min_components)
Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1780815&r1=1780814&r2=1780815&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Sun Jan 29 15:51:03 2017
@@ -731,7 +731,7 @@ build_text_conflict_options(apr_array_he
{
const client_option_t *o;
apr_array_header_t *builtin_options;
- apr_size_t nopt;
+ int nopt;
int i;
apr_pool_t *iterpool;
@@ -1192,7 +1192,7 @@ build_prop_conflict_options(apr_array_he
{
const client_option_t *o;
apr_array_header_t *builtin_options;
- apr_size_t nopt;
+ int nopt;
int i;
apr_pool_t *iterpool;
@@ -1444,7 +1444,7 @@ build_tree_conflict_options(
{
const client_option_t *o;
apr_array_header_t *builtin_options;
- apr_size_t nopt;
+ int nopt;
int i;
int next_unknown_option_code = 1;
apr_pool_t *iterpool;
@@ -1638,7 +1638,8 @@ prompt_move_target_path(int *preferred_m
svn_pool_destroy(iterpool);
- *preferred_move_target_idx = (idx - 1);
+ SVN_ERR_ASSERT((idx - 1) == (int)(idx - 1));
+ *preferred_move_target_idx = (int)(idx - 1);
return SVN_NO_ERROR;
}