0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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 * "setwinvar()" and "settabwinvar()" functions
*/ */
static void static void
setwinvar(typval_T *argvars, typval_T *rettv UNUSED, int off) setwinvar(typval_T *argvars, int off)
{ {
win_T *win; win_T *win;
win_T *save_curwin; win_T *save_curwin;
@ -3381,15 +3381,13 @@ f_getbufvar(typval_T *argvars, typval_T *rettv)
* "settabvar()" function * "settabvar()" function
*/ */
void void
f_settabvar(typval_T *argvars, typval_T *rettv) f_settabvar(typval_T *argvars, typval_T *rettv UNUSED)
{ {
tabpage_T *save_curtab; tabpage_T *save_curtab;
tabpage_T *tp; tabpage_T *tp;
char_u *varname, *tabvarname; char_u *varname, *tabvarname;
typval_T *varp; typval_T *varp;
rettv->vval.v_number = 0;
if (check_secure()) if (check_secure())
return; return;
@ -3421,18 +3419,18 @@ f_settabvar(typval_T *argvars, typval_T *rettv)
* "settabwinvar()" function * "settabwinvar()" function
*/ */
void 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 * "setwinvar()" function
*/ */
void 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; WCHAR *wp;
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL); wp = enc_to_utf16(tv_get_string(&argvars[0]), NULL);
if (wp == NULL) if (wp == NULL)
return; return;
@ -375,9 +372,6 @@ f_sound_playfile(typval_T *argvars, typval_T *rettv)
char buf[32]; char buf[32];
MCIERROR err; MCIERROR err;
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
esc = vim_strsave_shellescape(tv_get_string(&argvars[0]), FALSE, FALSE); esc = vim_strsave_shellescape(tv_get_string(&argvars[0]), FALSE, FALSE);
len = STRLEN(esc) + 5 + 18 + 1; 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}]) * prop_type_get({name} [, {bufnr}])
*/ */
void 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]); char_u *name = tv_get_string(&argvars[0]);

View File

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