mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.1413: compiler warning for unused variable
Problem: Compiler warning for unused variable. Solution: Move variable declaration. (John Marriott)
This commit is contained in:
parent
6e377eca8d
commit
2a003177eb
@ -258,24 +258,21 @@ f_reltimefloat(typval_T *argvars UNUSED, typval_T *rettv)
|
|||||||
void
|
void
|
||||||
f_reltimestr(typval_T *argvars UNUSED, typval_T *rettv)
|
f_reltimestr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||||
{
|
{
|
||||||
static char buf[50];
|
|
||||||
# ifdef FEAT_RELTIME
|
|
||||||
proftime_T tm;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
rettv->v_type = VAR_STRING;
|
rettv->v_type = VAR_STRING;
|
||||||
rettv->vval.v_string = NULL;
|
rettv->vval.v_string = NULL;
|
||||||
# ifdef FEAT_RELTIME
|
# ifdef FEAT_RELTIME
|
||||||
if (in_vim9script() && check_for_list_arg(argvars, 0) == FAIL)
|
if (in_vim9script() && check_for_list_arg(argvars, 0) == FAIL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
proftime_T tm;
|
||||||
if (list2proftime(&argvars[0], &tm) == OK)
|
if (list2proftime(&argvars[0], &tm) == OK)
|
||||||
{
|
{
|
||||||
# ifdef MSWIN
|
# ifdef MSWIN
|
||||||
rettv->vval.v_string = vim_strsave((char_u *)profile_msg(&tm));
|
rettv->vval.v_string = vim_strsave((char_u *)profile_msg(&tm));
|
||||||
# else
|
# else
|
||||||
|
static char buf[50];
|
||||||
long usec = tm.tv_fsec / (TV_FSEC_SEC / 1000000);
|
long usec = tm.tv_fsec / (TV_FSEC_SEC / 1000000);
|
||||||
sprintf(buf, "%3ld.%06ld", (long)tm.tv_sec, usec);
|
vim_snprintf(buf, sizeof(buf), "%3ld.%06ld", (long)tm.tv_sec, usec);
|
||||||
rettv->vval.v_string = vim_strsave((char_u *)buf);
|
rettv->vval.v_string = vim_strsave((char_u *)buf);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
@ -695,6 +695,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 */
|
||||||
|
/**/
|
||||||
|
1413,
|
||||||
/**/
|
/**/
|
||||||
1412,
|
1412,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user