diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.c | 2 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 1 | ||||
-rw-r--r-- | src/nvim/lua/executor.c | 2 | ||||
-rw-r--r-- | src/nvim/main.c | 6 | ||||
-rw-r--r-- | src/nvim/os/pty_conpty_win.c | 4 | ||||
-rw-r--r-- | src/nvim/path.c | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index c22f22366a..eefe5cf68b 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1512,7 +1512,7 @@ static char *find_pipe(const char *cmd) for (const char *p = cmd; *p != NUL; p++) { if (!inquote && *p == '|') { - return p; + return (char *)p; } if (*p == '"') { inquote = !inquote; diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index b875aafaad..f5e8eb1a06 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -1639,6 +1639,7 @@ int execute_cmd(exarg_T *eap, CmdParseInfo *cmdinfo, bool preview) char *errormsg = NULL; int retv = 0; +#undef ERROR #define ERROR(msg) \ do { \ errormsg = msg; \ diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 9cb42a81d3..c27df01342 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -585,7 +585,7 @@ static bool nlua_init_packages(lua_State *lstate) lua_getglobal(lstate, "require"); lua_pushstring(lstate, "vim._init_packages"); if (nlua_pcall(lstate, 1, 0)) { - mch_errmsg(lua_tostring(lstate, -1)); + mch_errmsg((char *)lua_tostring(lstate, -1)); mch_errmsg("\n"); return false; } diff --git a/src/nvim/main.c b/src/nvim/main.c index e395f8dc78..9ee9803c6d 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1273,7 +1273,7 @@ scripterror: vim_snprintf((char *)IObuff, IOSIZE, _("Attempt to open script file again: \"%s %s\"\n"), argv[-1], argv[0]); - mch_errmsg((const char *)IObuff); + mch_errmsg(IObuff); os_exit(2); } int error; @@ -1292,7 +1292,7 @@ scripterror: vim_snprintf((char *)IObuff, IOSIZE, _("Cannot open for reading: \"%s\": %s\n"), argv[0], os_strerror(error)); - mch_errmsg((const char *)IObuff); + mch_errmsg(IObuff); os_exit(2); } save_typebuf(); @@ -2055,7 +2055,7 @@ static void mainerr(const char *errstr, const char *str) mch_errmsg(_(errstr)); if (str != NULL) { mch_errmsg(": \""); - mch_errmsg(str); + mch_errmsg((char *)str); mch_errmsg("\""); } mch_errmsg(_("\nMore info with \"")); diff --git a/src/nvim/os/pty_conpty_win.c b/src/nvim/os/pty_conpty_win.c index f9478d951f..43c89f8865 100644 --- a/src/nvim/os/pty_conpty_win.c +++ b/src/nvim/os/pty_conpty_win.c @@ -67,7 +67,7 @@ conpty_t *os_conpty_init(char **in_name, char **out_name, uint16_t width, uint16 | PIPE_ACCESS_OUTBOUND | FILE_FLAG_FIRST_PIPE_INSTANCE; sa.nLength = sizeof(sa); - snprintf(buf, sizeof(buf), "\\\\.\\pipe\\nvim-term-in-%d-%d", + snprintf(buf, sizeof(buf), "\\\\.\\pipe\\nvim-term-in-%lld-%d", os_get_pid(), count); *in_name = xstrdup(buf); if ((in_read = CreateNamedPipeA(*in_name, @@ -81,7 +81,7 @@ conpty_t *os_conpty_init(char **in_name, char **out_name, uint16_t width, uint16 emsg = "create input pipe failed"; goto failed; } - snprintf(buf, sizeof(buf), "\\\\.\\pipe\\nvim-term-out-%d-%d", + snprintf(buf, sizeof(buf), "\\\\.\\pipe\\nvim-term-out-%lld-%d", os_get_pid(), count); *out_name = xstrdup(buf); if ((out_write = CreateNamedPipeA(*out_name, diff --git a/src/nvim/path.c b/src/nvim/path.c index 1413000680..007f55294b 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1867,7 +1867,7 @@ char *fix_fname(const char *fname) fname = xstrdup(fname); # ifdef USE_FNAME_CASE - path_fix_case(fname); // set correct case for file name + path_fix_case((char *)fname); // set correct case for file name # endif return (char *)fname; |