*: Make set_vim_var_\* functions have proper argument types

This commit is contained in:
ZyX
2016-03-20 21:31:49 +03:00
parent 9af400f979
commit 494b1c9bee
23 changed files with 381 additions and 357 deletions

View File

@@ -238,8 +238,8 @@ int main(int argc, char **argv)
check_and_set_isatty(&params);
// Get the name with which Nvim was invoked, with and without path.
set_vim_var_string(VV_PROGPATH, (char_u *)argv[0], -1);
set_vim_var_string(VV_PROGNAME, path_tail((char_u *)argv[0]), -1);
set_vim_var_string(VV_PROGPATH, argv[0], -1);
set_vim_var_string(VV_PROGNAME, (char *) path_tail((char_u *) argv[0]), -1);
event_init();
/*
@@ -1141,10 +1141,11 @@ scripterror:
/* If there is a "+123" or "-c" command, set v:swapcommand to the first
* one. */
if (parmp->n_commands > 0) {
p = xmalloc(STRLEN(parmp->commands[0]) + 3);
sprintf((char *)p, ":%s\r", parmp->commands[0]);
set_vim_var_string(VV_SWAPCOMMAND, p, -1);
xfree(p);
const size_t swcmd_len = STRLEN(parmp->commands[0]) + 3;
char *const swcmd = xmalloc(swcmd_len);
snprintf(swcmd, swcmd_len, ":%s\r", parmp->commands[0]);
set_vim_var_string(VV_SWAPCOMMAND, swcmd, -1);
xfree(swcmd);
}
TIME_MSG("parsing arguments");
}