On 06-Mar-2017 01:19, Bram Moolenaar wrote:
Patch 8.0.0419
Problem: Test for v:progpath fails on MS-Windows.
Solution: Expand to full path. Also add ".exe" when the path is an absolute
path.
Files: src/os_win32.c, src/main.c
After applying the 8.0.0416 patch and this patch, gcc (mingw64) gives
these warnings:
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -pipe -march=native -Wall
-O3 -fomit-frame-pointer -freg-struct-return -s os_win32.c -o
objnative/os_win32.o
os_win32.c: In function 'executable_exists':
os_win32.c:1921:18: warning: pointer targets in passing argument 1 of
'mch_getperm' differ in signedness [-Wpointer-sign]
if (mch_getperm(name) != -1 && !mch_isdir(name))
^~~~
In file included from proto.h:42:0,
from vim.h:2119,
from os_win32.c:23:
proto/os_win32.pro:20:6: note: expected 'char_u * {aka unsigned char *}'
but argument is of type 'char *'
long mch_getperm(char_u *name);
^~~~~~~~~~~
os_win32.c:1921:44: warning: pointer targets in passing argument 1 of
'mch_isdir' differ in signedness [-Wpointer-sign]
if (mch_getperm(name) != -1 && !mch_isdir(name))
^~~~
In file included from proto.h:42:0,
from vim.h:2119,
from os_win32.c:23:
proto/os_win32.pro:24:5: note: expected 'char_u * {aka unsigned char *}'
but argument is of type 'char *'
int mch_isdir(char_u *name);
^~~~~~~~~
os_win32.c:1925:22: warning: pointer targets in passing argument 1 of
'mch_isFullName' differ in signedness [-Wpointer-s
ign]
if (mch_isFullName(name))
^~~~
In file included from proto.h:43:0,
from vim.h:2119,
from os_win32.c:23:
proto/os_mswin.pro:10:5: note: expected 'char_u * {aka unsigned char *}'
but argument is of type 'char *'
int mch_isFullName(char_u *fname);
^~~~~~~~~~~~~~
The attached patch fixes it.
Cheers
John
--
--
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.
--- os_win32.c.orig 2017-03-06 05:14:34.542590000 +1100
+++ os_win32.c 2017-03-06 05:25:45.359008900 +1100
@@ -1918,11 +1918,11 @@
if (!use_path)
{
- if (mch_getperm(name) != -1 && !mch_isdir(name))
+ if (mch_getperm((char_u *)name) != -1 && !mch_isdir((char_u *)name))
{
if (path != NULL)
{
- if (mch_isFullName(name))
+ if (mch_isFullName((char_u *)name))
*path = vim_strsave((char_u *)name);
else
*path = FullName_save((char_u *)name, FALSE);