diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-06-03 20:23:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-06-03 20:23:41 +0000 |
commit | ef195046e60def3f6de6b879bec45de18894e56a (patch) | |
tree | 496ec6f2fbcc55eac302641c85c0f5696ee6374b | |
parent | 8f2bcb5ca5f5c3c6751948208d0284cedef931ef (diff) | |
download | mandoc-ef195046e60def3f6de6b879bec45de18894e56a.tar.gz |
Explicitly state that the cases in the inner switch in term_fill()
are exhaustive. While there is no bug, being explicit has no downside
is is potentially safer for the future.
Michal Nowak <mnowak at startmail dot com> reported that gcc 4.4.4
and 7.4.0 on illumos throw -Wuninitialized false positives.
-rw-r--r-- | term.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -281,6 +281,8 @@ term_fill(struct termp *p, size_t *nbr, size_t *vbr, size_t vtarget) case ASCII_BREAK: vn = vis; break; + default: + abort(); } /* Can break at the end of a word. */ if (breakline || vn > vtarget) |