diff options
| author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-13 13:02:10 +0100 | 
|---|---|---|
| committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-15 12:48:29 +0100 | 
| commit | 40cf1a1e749ab825e99ed948bc463bd0d8fa495e (patch) | |
| tree | 6d6186fb4e62152507c78190a6ad1c077328e3d0 /test/functional/api/window_spec.lua | |
| parent | faa000edcb97482c4f8adc3f436344584ceca326 (diff) | |
| download | rneovim-40cf1a1e749ab825e99ed948bc463bd0d8fa495e.tar.gz rneovim-40cf1a1e749ab825e99ed948bc463bd0d8fa495e.tar.bz2 rneovim-40cf1a1e749ab825e99ed948bc463bd0d8fa495e.zip | |
Fix warnings: spell.c: spell_move_to(): Garbage value: RI.
Problem    : Result of operation is garbage or undefined @ 2238.
Diagnostic : Real issue.
Rationale  : Problem occurs when searching forward starting on an empty
             line. This is, at 2127:
             ```
             p = buf + skip;
             endp = buf + len;
             while (p < endp) {
             ```
             when skip == 0, len == 0, implying p == endp and therefore
             not entering the loop.
             Under those conditions, comparison
             ```
             if (attr == HLF_COUNT)
             ```
             at line 2242 is really using a garbage value for `attr`.
             Most of the time the error doesn't produce visible problems
             as it only affects when dealing with wrapped words.
Resolution : Initialize `attr` at declaration to `HLF_COUNT`, which is
             used in the code when no bad word found yet.
Diffstat (limited to 'test/functional/api/window_spec.lua')
0 files changed, 0 insertions, 0 deletions
