win: fix warnings

This commit is contained in:
Justin M. Keyes 2017-01-13 07:40:49 +01:00
parent e40946a5be
commit 32c7971b2a
4 changed files with 9 additions and 5 deletions

View File

@ -173,9 +173,8 @@ static char_u *skip_string(char_u *p)
char_u *delim = p + 2;
char_u *paren = vim_strchr(delim, '(');
if (paren != NULL)
{
long delim_len = paren - delim;
if (paren != NULL) {
ptrdiff_t delim_len = paren - delim;
for (p += 3; *p; ++p)
if (p[0] == ')' && STRNCMP(p + 1, delim, delim_len) == 0

View File

@ -1484,6 +1484,9 @@ int utf8_to_utf16(const char *str, WCHAR **strw)
(WCHAR *)pos,
wchar_len);
assert(r == wchar_len);
if (r != wchar_len) {
EMSG2("MultiByteToWideChar failed: %d", r);
}
*strw = (WCHAR *)pos;
return 0;
@ -1519,6 +1522,9 @@ int utf16_to_utf8(const WCHAR *strw, char **str)
NULL,
NULL);
assert(r == utf8_len);
if (r != utf8_len) {
EMSG2("WideCharToMultiByte failed: %d", r);
}
*str = pos;
return 0;

View File

@ -939,7 +939,6 @@ char_u * os_resolve_shortcut(char_u *fname)
OLECHAR wsz[MAX_PATH];
char_u *rfname = NULL;
int len;
int conversion_result;
IShellLinkW *pslw = NULL;
WIN32_FIND_DATAW ffdw;

View File

@ -341,7 +341,7 @@ describe('jobs', function()
function! s:OnEvent(id, data, event) dict
let g:job_result = get(self, 'user')
endfunction
let s:job = jobstart('echo', {
let s:job = jobstart('echo "foo"', {
\ 'on_stdout': 's:OnEvent',
\ 'on_stderr': 's:OnEvent',
\ 'on_exit': 's:OnEvent',