diff src/eval.c @ 8080:b6cb94ad97a4 v7.4.1334

commit https://github.com/vim/vim/commit/6aa2cd4be287f35f95f35c2cec6d5a24f53c4d3c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 16 15:06:59 2016 +0100 patch 7.4.1334 Problem: Many compiler warnings with MingW. Solution: Add type casts. (Yasuhiro Matsumoto)
author Christian Brabandt <cb@256bit.org>
date Tue, 16 Feb 2016 15:15:06 +0100
parents 7676818d486b
children 04ed31f9ef70
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -14554,7 +14554,7 @@ f_job_start(typval_T *argvars UNUSED, ty
 #ifdef USE_ARGV
     mch_start_job(argv, job);
 #else
-    mch_start_job(cmd, job);
+    mch_start_job((char *)cmd, job);
 #endif
 
 theend:
@@ -16410,7 +16410,7 @@ f_remote_peek(typval_T *argvars UNUSED, 
 	return;		/* type error; errmsg already given */
     }
 # ifdef WIN32
-    sscanf(serverid, SCANF_HEX_LONG_U, &n);
+    sscanf((const char *)serverid, SCANF_HEX_LONG_U, &n);
     if (n == 0)
 	rettv->vval.v_number = -1;
     else
@@ -16456,7 +16456,7 @@ f_remote_read(typval_T *argvars UNUSED, 
 	/* The server's HWND is encoded in the 'id' parameter */
 	long_u		n = 0;
 
-	sscanf(serverid, SCANF_HEX_LONG_U, &n);
+	sscanf((char *)serverid, SCANF_HEX_LONG_U, &n);
 	if (n != 0)
 	    r = serverGetReply((HWND)n, FALSE, TRUE, TRUE);
 	if (r == NULL)
@@ -25415,7 +25415,7 @@ get_short_pathname(char_u **fnamep, char
     char_u	*newbuf;
 
     len = *fnamelen;
-    l = GetShortPathName(*fnamep, *fnamep, len);
+    l = GetShortPathName((LPSTR)*fnamep, (LPSTR)*fnamep, len);
     if (l > len - 1)
     {
 	/* If that doesn't work (not enough space), then save the string
@@ -25428,7 +25428,7 @@ get_short_pathname(char_u **fnamep, char
 	*fnamep = *bufp = newbuf;
 
 	/* Really should always succeed, as the buffer is big enough. */
-	l = GetShortPathName(*fnamep, *fnamep, l+1);
+	l = GetShortPathName((LPSTR)*fnamep, (LPSTR)*fnamep, l+1);
     }
 
     *fnamelen = l;
@@ -25720,7 +25720,7 @@ repeat:
 	    p = alloc(_MAX_PATH + 1);
 	    if (p != NULL)
 	    {
-		if (GetLongPathName(*fnamep, p, _MAX_PATH))
+		if (GetLongPathName((LPSTR)*fnamep, (LPSTR)p, _MAX_PATH))
 		{
 		    vim_free(*bufp);
 		    *bufp = *fnamep = p;