subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1816762 - in /subversion/trunk/subversion: libsvn_client/shelve.c svn/shelve-cmd.c
Date Thu, 30 Nov 2017 21:18:02 GMT
Author: julianfoad
Date: Thu Nov 30 21:18:02 2017
New Revision: 1816762

URL: http://svn.apache.org/viewvc?rev=1816762&view=rev
Log:
Resolve two "loses integer precision" warnings.

Found by: danielsh

Modified:
    subversion/trunk/subversion/libsvn_client/shelve.c
    subversion/trunk/subversion/svn/shelve-cmd.c

Modified: subversion/trunk/subversion/libsvn_client/shelve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/shelve.c?rev=1816762&r1=1816761&r2=1816762&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/shelve.c (original)
+++ subversion/trunk/subversion/libsvn_client/shelve.c Thu Nov 30 21:18:02 2017
@@ -386,7 +386,7 @@ svn_client_shelves_list(apr_hash_t **she
   for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
     {
       const char *filename = apr_hash_this_key(hi);
-      int len = strlen(filename);
+      size_t len = strlen(filename);
 
       if (len > 6 && strcmp(filename + len - 6, ".patch") == 0)
         {

Modified: subversion/trunk/subversion/svn/shelve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelve-cmd.c?rev=1816762&r1=1816761&r2=1816762&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelve-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelve-cmd.c Thu Nov 30 21:18:02 2017
@@ -102,7 +102,7 @@ shelves_list(const char *local_abspath,
       const svn_sort__item_t *item = &APR_ARRAY_IDX(list, i, svn_sort__item_t);
       const char *name = item->key;
       svn_client_shelved_patch_info_t *info = item->value;
-      int age = (apr_time_now() - info->mtime) / 1000000 / 60;
+      int age = (int)((apr_time_now() - info->mtime) / 1000000 / 60);
 
       SVN_ERR(svn_cmdline_printf(scratch_pool,
                                  _("%-30s %6d mins old %10ld bytes\n"),



Mime
View raw message