Patch 7.4.2097
Problem:    Warning from 64 bit compiler.
Solution:   use size_t instead of int. (Mike Williams)
Files:      src/message.c


*** ../vim-7.4.2096/src/message.c       2016-07-20 00:10:44.484250033 +0200
--- src/message.c       2016-07-23 17:24:35.816025642 +0200
***************
*** 237,254 ****
  trunc_string(
      char_u    *s,
      char_u    *buf,
!     int               room,
      int               buflen)
  {
!     int               half;
!     int               len;
      int               e;
      int               i;
      int               n;
  
!     room -= 3;
      half = room / 2;
-     len = 0;
  
      /* First part: Start of the string. */
      for (e = 0; len < half && e < buflen; ++e)
--- 237,255 ----
  trunc_string(
      char_u    *s,
      char_u    *buf,
!     int               room_in,
      int               buflen)
  {
!     size_t    room = room_in - 3; /* "..." takes 3 chars */
!     size_t    half;
!     size_t    len = 0;
      int               e;
      int               i;
      int               n;
  
!     if (room_in < 3)
!       room = 0;
      half = room / 2;
  
      /* First part: Start of the string. */
      for (e = 0; len < half && e < buflen; ++e)
***************
*** 320,326 ****
        if (s != buf)
        {
            len = STRLEN(s);
!           if (len >= buflen)
                len = buflen - 1;
            len = len - e + 1;
            if (len < 1)
--- 321,327 ----
        if (s != buf)
        {
            len = STRLEN(s);
!           if (len >= (size_t)buflen)
                len = buflen - 1;
            len = len - e + 1;
            if (len < 1)
***************
*** 333,340 ****
      {
        /* set the middle and copy the last part */
        mch_memmove(buf + e, "...", (size_t)3);
!       len = (int)STRLEN(s + i) + 1;
!       if (len >= buflen - e - 3)
            len = buflen - e - 3 - 1;
        mch_memmove(buf + e + 3, s + i, len);
        buf[e + 3 + len - 1] = NUL;
--- 334,341 ----
      {
        /* set the middle and copy the last part */
        mch_memmove(buf + e, "...", (size_t)3);
!       len = STRLEN(s + i) + 1;
!       if (len >= (size_t)buflen - e - 3)
            len = buflen - e - 3 - 1;
        mch_memmove(buf + e + 3, s + i, len);
        buf[e + 3 + len - 1] = NUL;
*** ../vim-7.4.2096/src/version.c       2016-07-23 15:47:29.046684257 +0200
--- src/version.c       2016-07-23 17:28:00.430120200 +0200
***************
*** 760,761 ****
--- 760,763 ----
  {   /* Add new patch number below this line */
+ /**/
+     2097,
  /**/

-- 
ARTHUR: Did you say shrubberies?
ROGER:  Yes.  Shrubberies are my trade.  I am a shrubber.  My name is Roger
        the Shrubber.  I arrange, design, and sell shrubberies.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui