72f8d87
To: vim-dev@vim.org
72f8d87
Subject: Patch 7.2.134
72f8d87
Fcc: outbox
72f8d87
From: Bram Moolenaar <Bram@moolenaar.net>
72f8d87
Mime-Version: 1.0
72f8d87
Content-Type: text/plain; charset=ISO-8859-1
72f8d87
Content-Transfer-Encoding: 8bit
72f8d87
------------
72f8d87
72f8d87
Patch 7.2.134
72f8d87
Problem:    Warning for discarding "const" from pointer.
72f8d87
Solution:   Don't pass const pointer to mch_memmove().
72f8d87
Files:	    src/fileio.c
72f8d87
72f8d87
72f8d87
*** ../vim-7.2.133/src/fileio.c	Thu Mar  5 03:13:51 2009
72f8d87
--- src/fileio.c	Wed Mar 11 12:59:35 2009
72f8d87
***************
72f8d87
*** 5288,5300 ****
72f8d87
  	    /* Convert with iconv(). */
72f8d87
  	    if (ip->bw_restlen > 0)
72f8d87
  	    {
72f8d87
  		/* Need to concatenate the remainder of the previous call and
72f8d87
  		 * the bytes of the current call.  Use the end of the
72f8d87
  		 * conversion buffer for this. */
72f8d87
  		fromlen = len + ip->bw_restlen;
72f8d87
! 		from = (char *)ip->bw_conv_buf + ip->bw_conv_buflen - fromlen;
72f8d87
! 		mch_memmove((void *)from, ip->bw_rest, (size_t)ip->bw_restlen);
72f8d87
! 		mch_memmove((void *)(from + ip->bw_restlen), buf, (size_t)len);
72f8d87
  		tolen = ip->bw_conv_buflen - fromlen;
72f8d87
  	    }
72f8d87
  	    else
72f8d87
--- 5288,5303 ----
72f8d87
  	    /* Convert with iconv(). */
72f8d87
  	    if (ip->bw_restlen > 0)
72f8d87
  	    {
72f8d87
+ 		char *fp;
72f8d87
+ 
72f8d87
  		/* Need to concatenate the remainder of the previous call and
72f8d87
  		 * the bytes of the current call.  Use the end of the
72f8d87
  		 * conversion buffer for this. */
72f8d87
  		fromlen = len + ip->bw_restlen;
72f8d87
! 		fp = (char *)ip->bw_conv_buf + ip->bw_conv_buflen - fromlen;
72f8d87
! 		mch_memmove(fp, ip->bw_rest, (size_t)ip->bw_restlen);
72f8d87
! 		mch_memmove(fp + ip->bw_restlen, buf, (size_t)len);
72f8d87
! 		from = fp;
72f8d87
  		tolen = ip->bw_conv_buflen - fromlen;
72f8d87
  	    }
72f8d87
  	    else
72f8d87
*** ../vim-7.2.133/src/version.c	Wed Mar 11 12:45:44 2009
72f8d87
--- src/version.c	Wed Mar 11 13:08:25 2009
72f8d87
***************
72f8d87
*** 678,679 ****
72f8d87
--- 678,681 ----
72f8d87
  {   /* Add new patch number below this line */
72f8d87
+ /**/
72f8d87
+     134,
72f8d87
  /**/
72f8d87
72f8d87
-- 
72f8d87
hundred-and-one symptoms of being an internet addict:
72f8d87
193. You ask your girlfriend to drive home so you can sit back with
72f8d87
     your PDA and download the information to your laptop
72f8d87
72f8d87
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
72f8d87
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
72f8d87
\\\        download, build and distribute -- http://www.A-A-P.org        ///
72f8d87
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///