mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix warning: "Uninitialized argument"
clang scan-build thinks os_system() could set `do_profiling` flag. Found by clang scan-build 5.0
This commit is contained in:
parent
25bc656988
commit
863dbbb3d4
@ -16461,6 +16461,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv,
|
|||||||
bool retlist)
|
bool retlist)
|
||||||
{
|
{
|
||||||
proftime_T wait_time;
|
proftime_T wait_time;
|
||||||
|
bool profiling = do_profiling == PROF_YES;
|
||||||
|
|
||||||
rettv->v_type = VAR_STRING;
|
rettv->v_type = VAR_STRING;
|
||||||
rettv->vval.v_string = NULL;
|
rettv->vval.v_string = NULL;
|
||||||
@ -16497,7 +16498,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv,
|
|||||||
xfree(cmdstr);
|
xfree(cmdstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_profiling == PROF_YES) {
|
if (profiling) {
|
||||||
prof_child_enter(&wait_time);
|
prof_child_enter(&wait_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16506,7 +16507,7 @@ static void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv,
|
|||||||
char *res = NULL;
|
char *res = NULL;
|
||||||
int status = os_system(argv, input, input_len, &res, &nread);
|
int status = os_system(argv, input, input_len, &res, &nread);
|
||||||
|
|
||||||
if (do_profiling == PROF_YES) {
|
if (profiling) {
|
||||||
prof_child_exit(&wait_time);
|
prof_child_exit(&wait_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user