aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Zhao <zhaozg@gmail.com>2018-01-17 19:35:57 +0800
committerGeorge Zhao <zhaozg@gmail.com>2018-01-18 21:30:03 +0800
commit06994e0e21eb5545aef7c2234f5d1a271865366e (patch)
treec0880efd3f0666035804dcf8c484ec06a628cd4e /src
parentbc17ad31dccb446fc24e0f6bb3cb2149ce951ae5 (diff)
downloadrneovim-06994e0e21eb5545aef7c2234f5d1a271865366e.tar.gz
rneovim-06994e0e21eb5545aef7c2234f5d1a271865366e.tar.bz2
rneovim-06994e0e21eb5545aef7c2234f5d1a271865366e.zip
Fix warning about conversion on mingw64
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/buffer.c6
-rw-r--r--src/nvim/ex_cmds.c2
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/file_search.c2
-rw-r--r--src/nvim/option.c8
-rw-r--r--src/nvim/os/pty_process_win.c2
-rw-r--r--src/nvim/path.c8
-rw-r--r--src/nvim/tui/input.c2
8 files changed, 18 insertions, 14 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 01dde9dd09..af723639c5 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -399,7 +399,11 @@ void nvim_buf_set_lines(uint64_t channel_id,
// Only adjust marks if we managed to switch to a window that holds
// the buffer, otherwise line numbers will be invalid.
if (save_curbuf.br_buf == NULL) {
- mark_adjust((linenr_T)start, (linenr_T)(end - 1), MAXLNUM, extra, false);
+ mark_adjust((linenr_T)start,
+ (linenr_T)(end - 1),
+ MAXLNUM,
+ (long)extra,
+ false);
}
changed_lines((linenr_T)start, 0, (linenr_T)end, (long)extra);
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 06379f159c..6ffd255dc7 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -1417,7 +1417,7 @@ char_u *make_filter_cmd(char_u *cmd, char_u *itmp, char_u *otmp)
#else
// For shells that don't understand braces around commands, at least allow
// the use of commands in a pipe.
- xstrlcpy(buf, cmd, len);
+ xstrlcpy(buf, (char *)cmd, len);
if (itmp != NULL) {
// If there is a pipe, we have to put the '<' in front of it.
// Don't do this when 'shellquote' is not empty, otherwise the
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 82fac8d78e..ade8b46956 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -738,7 +738,7 @@ static int command_line_execute(VimState *state, int key)
}
if (vim_ispathsep(ccline.cmdbuff[s->j])
#ifdef BACKSLASH_IN_FILENAME
- && vim_strchr(" *?[{`$%#", ccline.cmdbuff[s->j + 1])
+ && vim_strchr((const char_u *)" *?[{`$%#", ccline.cmdbuff[s->j + 1])
== NULL
#endif
) {
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c
index 8094a1b266..c6f2166dab 100644
--- a/src/nvim/file_search.c
+++ b/src/nvim/file_search.c
@@ -1586,7 +1586,7 @@ int vim_chdirfile(char_u *fname)
}
#ifdef BACKSLASH_IN_FILENAME
- slash_adjust(dir);
+ slash_adjust((char_u *)dir);
#endif
if (!strequal(dir, (char *)NameBuff)) {
do_autocmd_dirchanged(dir, kCdScopeWindow);
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 192d2b0f78..d9ee8f8b94 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -844,7 +844,7 @@ set_option_default (
if (options[opt_idx].indir == PV_SCROLL)
win_comp_scroll(curwin);
else {
- *(long *)varp = (long)options[opt_idx].def_val[dvi];
+ *(long *)varp = (long)(intptr_t)options[opt_idx].def_val[dvi];
/* May also set global value for local option. */
if (both)
*(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) =
@@ -926,7 +926,7 @@ void set_number_default(char *name, long val)
opt_idx = findoption(name);
if (opt_idx >= 0) {
- options[opt_idx].def_val[VI_DEFAULT] = (char_u *)val;
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)(intptr_t)val;
}
}
@@ -1442,7 +1442,7 @@ do_set (
*/
++arg;
if (nextchar == '&')
- value = (long)options[opt_idx].def_val[
+ value = (long)(intptr_t)options[opt_idx].def_val[
((flags & P_VI_DEF) || cp_val)
? VI_DEFAULT : VIM_DEFAULT];
else if (nextchar == '<') {
@@ -5012,7 +5012,7 @@ static int optval_default(vimoption_T *p, char_u *varp)
return TRUE; /* hidden option is always at default */
dvi = ((p->flags & P_VI_DEF) || p_cp) ? VI_DEFAULT : VIM_DEFAULT;
if (p->flags & P_NUM)
- return *(long *)varp == (long)p->def_val[dvi];
+ return *(long *)varp == (long)(intptr_t)p->def_val[dvi];
if (p->flags & P_BOOL)
return *(int *)varp == (int)(intptr_t)p->def_val[dvi];
/* P_STRING */
diff --git a/src/nvim/os/pty_process_win.c b/src/nvim/os/pty_process_win.c
index 3c4839a076..c249536536 100644
--- a/src/nvim/os/pty_process_win.c
+++ b/src/nvim/os/pty_process_win.c
@@ -131,7 +131,7 @@ int pty_process_spawn(PtyProcess *ptyproc)
}
goto cleanup;
}
- proc->pid = GetProcessId(process_handle);
+ proc->pid = (int)GetProcessId(process_handle);
if (!RegisterWaitForSingleObject(
&ptyproc->finish_wait,
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 51adcfb135..09cede8805 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -332,7 +332,7 @@ int path_fnamencmp(const char *const fname1, const char *const fname2,
&& (p_fic ? (c1 != c2 && CH_FOLD(c1) != CH_FOLD(c2)) : c1 != c2)) {
break;
}
- len -= MB_PTR2LEN((const char_u *)p1);
+ len -= (size_t)MB_PTR2LEN((const char_u *)p1);
p1 += MB_PTR2LEN((const char_u *)p1);
p2 += MB_PTR2LEN((const char_u *)p2);
}
@@ -1691,7 +1691,7 @@ int vim_FullName(const char *fname, char *buf, size_t len, bool force)
if (strlen(fname) > (len - 1)) {
xstrlcpy(buf, fname, len); // truncate
#ifdef WIN32
- slash_adjust(buf);
+ slash_adjust((char_u *)buf);
#endif
return FAIL;
}
@@ -1706,7 +1706,7 @@ int vim_FullName(const char *fname, char *buf, size_t len, bool force)
xstrlcpy(buf, fname, len); // something failed; use the filename
}
#ifdef WIN32
- slash_adjust(buf);
+ slash_adjust((char_u *)buf);
#endif
return rv;
}
@@ -1741,7 +1741,7 @@ char *fix_fname(const char *fname)
path_fix_case((char_u *)fname); // set correct case for file name
# endif
- return fname;
+ return (char *)fname;
#endif
}
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index 96bb692db9..698be02dbf 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -49,7 +49,7 @@ void term_input_init(TermInput *input, Loop *loop)
#ifdef WIN32
uv_tty_init(loop, &input->tty_in, 0, 1);
uv_tty_set_mode(&input->tty_in, UV_TTY_MODE_RAW);
- rstream_init_stream(&input->read_stream, &input->tty_in, 0xfff);
+ rstream_init_stream(&input->read_stream, (uv_stream_t *)&input->tty_in, 0xfff);
#else
rstream_init_fd(loop, &input->read_stream, input->in_fd, 0xfff);
#endif