summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-06-03 20:23:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-06-03 20:23:41 +0000
commitef195046e60def3f6de6b879bec45de18894e56a (patch)
tree496ec6f2fbcc55eac302641c85c0f5696ee6374b
parent8f2bcb5ca5f5c3c6751948208d0284cedef931ef (diff)
downloadmandoc-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/term.c b/term.c
index 1c7cce6e..cdeb55cc 100644
--- a/term.c
+++ b/term.c
@@ -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)