mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warning about conversion on mingw64
This commit is contained in:
parent
bc17ad31dc
commit
06994e0e21
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
) {
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user