mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
ci(windows): treat compiler warnings as errors
Reduce the warning level from 3 to 1 and fix all warnings.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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; \
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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 \""));
|
||||
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user