diff options
author | John Szakmeister <john@szakmeister.net> | 2015-04-18 16:52:43 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2015-04-18 16:52:43 -0400 |
commit | 639504894610361198447ddaaa557b4877136682 (patch) | |
tree | 4f03f25fbd45dd83749397038f54cb3a0df84f39 /src/nvim/eval.c | |
parent | a88e2f4fd4c3e10aabd41e758cc845332be013da (diff) | |
parent | f03780c1b86af0fd3cc936f21d38788e4231c886 (diff) | |
download | rneovim-639504894610361198447ddaaa557b4877136682.tar.gz rneovim-639504894610361198447ddaaa557b4877136682.tar.bz2 rneovim-639504894610361198447ddaaa557b4877136682.zip |
Merge pull request #2443 from jszakmeister/fix-more-release-warnings
Fix a few uninitialized variable warnings.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 5056dbfcc7..66c78f1390 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -19085,15 +19085,26 @@ call_user_func ( --no_wait_return; } } + + bool func_not_yet_profiling_but_should = + do_profiling == PROF_YES + && !fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL); + + if (func_not_yet_profiling_but_should) + func_do_profile(fp); + + bool func_or_func_caller_profiling = + do_profiling == PROF_YES + && (fp->uf_profiling + || (fc->caller != NULL && fc->caller->func->uf_profiling)); + + if (func_or_func_caller_profiling) { + ++fp->uf_tm_count; + call_start = profile_start(); + fp->uf_tm_children = profile_zero(); + } + if (do_profiling == PROF_YES) { - if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL)) - func_do_profile(fp); - if (fp->uf_profiling - || (fc->caller != NULL && fc->caller->func->uf_profiling)) { - ++fp->uf_tm_count; - call_start = profile_start(); - fp->uf_tm_children = profile_zero(); - } script_prof_save(&wait_start); } @@ -19116,9 +19127,7 @@ call_user_func ( rettv->vval.v_number = -1; } - if (do_profiling == PROF_YES && (fp->uf_profiling - || (fc->caller != NULL && - fc->caller->func->uf_profiling))) { + if (func_or_func_caller_profiling) { call_start = profile_end(call_start); call_start = profile_sub_wait(wait_start, call_start); fp->uf_tm_total = profile_add(fp->uf_tm_total, call_start); |