diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-02 14:36:00 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-02 14:38:28 -0400 |
commit | 1c43fb1d51cd76ccca142e73d72af56f6fb0461d (patch) | |
tree | 7f6833fff12f8052c444db6b2e6ab6585f27e622 /src/nvim/syntax.c | |
parent | 6c5772f7daf0017b0a3cc9e67055b084f2779ad7 (diff) | |
download | rneovim-1c43fb1d51cd76ccca142e73d72af56f6fb0461d.tar.gz rneovim-1c43fb1d51cd76ccca142e73d72af56f6fb0461d.tar.bz2 rneovim-1c43fb1d51cd76ccca142e73d72af56f6fb0461d.zip |
syntax: zero-init local structs
Fix https://neovim.io/doc/reports/clang/report-ee5dbd.html#EndPath
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index ac8ace9fff..bdbc09a87a 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -2460,11 +2460,8 @@ update_si_end( int force /* when TRUE overrule a previous end */ ) { - lpos_T startpos; - lpos_T endpos; lpos_T hl_endpos; lpos_T end_endpos; - int end_idx; /* return quickly for a keyword */ if (sip->si_idx < 0) @@ -2480,9 +2477,12 @@ update_si_end( * We need to find the end of the region. It may continue in the next * line. */ - end_idx = 0; - startpos.lnum = current_lnum; - startpos.col = startcol; + int end_idx = 0; + lpos_T startpos = { + .lnum = current_lnum, + .col = startcol, + }; + lpos_T endpos = { 0 }; find_endpos(sip->si_idx, &startpos, &endpos, &hl_endpos, &(sip->si_flags), &end_endpos, &end_idx, sip->si_extmatch); |