summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-07-01 21:08:48 +0200
committerBram Moolenaar <bram@vim.org>2013-07-01 21:08:48 +0200
commitccd5cd356bcd1ba5a6893c4f969fcc08a57e10d6 (patch)
treed6afa41c7fc1712793d74eedcdb4299869c41b15
parent3270dcd84cab33ead7ae3d6821c3e1034ee55b9b (diff)
downloadvim-ccd5cd356bcd1ba5a6893c4f969fcc08a57e10d6.tar.gz
updated for version 7.3.1284v7.3.1284v7-3-1284
Problem: Compiler warnings in MS-Windows clipboard handling. Solution: Add type casts. (Ken Takata)
-rw-r--r--src/version.c2
-rw-r--r--src/winclip.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/src/version.c b/src/version.c
index 4b0e3400..ce11e637 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1284,
+/**/
1283,
/**/
1282,
diff --git a/src/winclip.c b/src/winclip.c
index 19cf182a..0f110ffc 100644
--- a/src/winclip.c
+++ b/src/winclip.c
@@ -180,7 +180,7 @@ WideCharToMultiByte_alloc(UINT cp, DWORD flags,
{
*outlen = WideCharToMultiByte(cp, flags, in, inlen, NULL, 0, def, useddef);
/* Add one one byte to avoid a zero-length alloc(). */
- *out = alloc((unsigned)*outlen + 1);
+ *out = (LPSTR)alloc((unsigned)*outlen + 1);
if (*out != NULL)
{
WideCharToMultiByte(cp, flags, in, inlen, *out, *outlen, def, useddef);
@@ -557,7 +557,7 @@ clip_mch_set_selection(VimClipboard *cbd)
return; /* out of memory */
}
WideCharToMultiByte(GetACP(), 0, out, len,
- str, metadata.txtlen, 0, 0);
+ (LPSTR)str, metadata.txtlen, 0, 0);
/* Allocate memory for the UTF-16 text, add one NUL word to
* terminate the string. */
@@ -584,7 +584,7 @@ clip_mch_set_selection(VimClipboard *cbd)
if (lpszMem)
{
- vim_strncpy(lpszMem, str, metadata.txtlen);
+ vim_strncpy((char_u *)lpszMem, str, metadata.txtlen);
GlobalUnlock(hMem);
}
}
@@ -677,7 +677,8 @@ enc_to_utf16(char_u *str, int *lenp)
{
/* We can do any CP### -> UTF-16 in one pass, and we can do it
* without iconv() (convert_* may need iconv). */
- MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length);
+ MultiByteToWideChar_alloc(enc_codepage, 0, (LPCSTR)str, *lenp,
+ &ret, &length);
}
else
{
@@ -787,7 +788,8 @@ acp_to_enc(str, str_size, out, outlen)
{
LPWSTR widestr;
- MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen);
+ MultiByteToWideChar_alloc(GetACP(), 0, (LPCSTR)str, str_size,
+ &widestr, outlen);
if (widestr != NULL)
{
++*outlen; /* Include the 0 after the string */