mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: syntax.c: syn_regexec(): Uninitialized arg: MI.
Problem : Uninitialized argument value @ 2863. Diagnostic : Multithreading issue. Rationale : Error can only occur if global `syn_time_on` is changed while the function is executing. Resolution : Use local copy of gloval var.
This commit is contained in:
parent
2aa8c7c41f
commit
ce9c4e9a6f
@ -2851,15 +2851,16 @@ static int syn_regexec(regmmatch_T *rmp, linenr_T lnum, colnr_T col, syn_time_T
|
||||
{
|
||||
int r;
|
||||
proftime_T pt;
|
||||
const int l_syn_time_on = syn_time_on;
|
||||
|
||||
if (syn_time_on) {
|
||||
if (l_syn_time_on) {
|
||||
pt = profile_start();
|
||||
}
|
||||
|
||||
rmp->rmm_maxcol = syn_buf->b_p_smc;
|
||||
r = vim_regexec_multi(rmp, syn_win, syn_buf, lnum, col, NULL);
|
||||
|
||||
if (syn_time_on) {
|
||||
if (l_syn_time_on) {
|
||||
pt = profile_end(pt);
|
||||
st->total = profile_add(st->total, pt);
|
||||
if (profile_cmp(pt, st->slowest) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user