1
0
forked from aniani/vim

patch 8.2.0085: dead code in builtin functions

Problem:    Dead code in builtin functions.
Solution:   Clean up the code.
This commit is contained in:
Bram Moolenaar 2020-01-04 16:13:49 +01:00
parent 0892832bb6
commit 3d8a513b46
4 changed files with 9 additions and 15 deletions

View File

@ -2980,7 +2980,7 @@ getwinvar(
* "setwinvar()" and "settabwinvar()" functions
*/
static void
setwinvar(typval_T *argvars, typval_T *rettv UNUSED, int off)
setwinvar(typval_T *argvars, int off)
{
win_T *win;
win_T *save_curwin;
@ -3381,15 +3381,13 @@ f_getbufvar(typval_T *argvars, typval_T *rettv)
* "settabvar()" function
*/
void
f_settabvar(typval_T *argvars, typval_T *rettv)
f_settabvar(typval_T *argvars, typval_T *rettv UNUSED)
{
tabpage_T *save_curtab;
tabpage_T *tp;
char_u *varname, *tabvarname;
typval_T *varp;
rettv->vval.v_number = 0;
if (check_secure())
return;
@ -3421,18 +3419,18 @@ f_settabvar(typval_T *argvars, typval_T *rettv)
* "settabwinvar()" function
*/
void
f_settabwinvar(typval_T *argvars, typval_T *rettv)
f_settabwinvar(typval_T *argvars, typval_T *rettv UNUSED)
{
setwinvar(argvars, rettv, 1);
setwinvar(argvars, 1);
}
/*
* "setwinvar()" function
*/
void
f_setwinvar(typval_T *argvars, typval_T *rettv)
f_setwinvar(typval_T *argvars, typval_T *rettv UNUSED)
{
setwinvar(argvars, rettv, 0);
setwinvar(argvars, 0);
}
/*

View File

@ -351,9 +351,6 @@ f_sound_playevent(typval_T *argvars, typval_T *rettv)
{
WCHAR *wp;
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL);
if (wp == NULL)
return;
@ -375,9 +372,6 @@ f_sound_playfile(typval_T *argvars, typval_T *rettv)
char buf[32];
MCIERROR err;
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
esc = vim_strsave_shellescape(tv_get_string(&argvars[0]), FALSE, FALSE);
len = STRLEN(esc) + 5 + 18 + 1;

View File

@ -885,7 +885,7 @@ f_prop_type_delete(typval_T *argvars, typval_T *rettv UNUSED)
* prop_type_get({name} [, {bufnr}])
*/
void
f_prop_type_get(typval_T *argvars, typval_T *rettv UNUSED)
f_prop_type_get(typval_T *argvars, typval_T *rettv)
{
char_u *name = tv_get_string(&argvars[0]);

View File

@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
85,
/**/
84,
/**/