• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

neovim / neovim / 24643
77%

Build:
DEFAULT BRANCH: master
Ran 21 Nov 2017 01:53AM UTC
Jobs 1
Files 678
Run time 27s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
24643

push

travis-ci

justinmk
syntax.c: Fix maybe-uninitialized warning (#7596)

When building in release mode, gcc generated a maybe-initialized
warning in get_syn_options. The warning is both right and wrong;
there is an execution path where the len variable is not
initialized in the code:
...
int len;
...
for (fidx = ARRAY_SIZE(flagtab); --fidx >= 0; ) {
  p = flagtab[fidx].name;
  int i;
  for (i = 0, len = 0; p[i] != NUL; i += 2, ++len)
    if (arg[len] != p[i] && arg[len] != p[i + 1])
      break;
  // <snip>
}
...
  arg = skipwhite(arg + len);
...

The initial for loop will not execute if ARRAY_SIZE(flagtab) == 0,
and thus len will never be initialized. flagtab is a local-static
variable, initialized to a long array of structured data, so
ARRAY_SIZE(flagtab) can't be 0.

However, gcc doesn't recognize ARRAY_SIZE(flagtab) as a constant.
There are any number of reasons this could happen. In any case,
the message can be fixed with a len=0 before the first for loop.

In addition to the above warning, I've labeled flagtab and
first_letters as const. They should never change.

2 of 2 new or added lines in 1 file covered. (100.0%)

87771 of 113450 relevant lines covered (77.37%)

186872.37 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
src/nvim/event/process.c
2
100.0
src/nvim/eval.c
50
100.0
src/nvim/ex_cmds.c
Jobs
ID Job ID Ran Files Coverage
7 24643.7 (GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON") 21 Nov 2017 01:53AM UTC 0
77.37
Travis Job 24643.7
Source Files on build 24643
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #24643
  • 8674b0c3 on github
  • Prev Build on master (#24629)
  • Next Build on master (#24644)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc