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 | dfcfddad25114d69f0ea23cc3caf55ef9e7ce6e7 (patch) | |
tree | eca8be4b0197ea26dfe71cdb469437816bb32bbd | |
parent | 8238052233df39761f179f81db886271c18f4cd4 (diff) | |
download | mandoc-dfcfddad25114d69f0ea23cc3caf55ef9e7ce6e7.tar.gz mandoc-dfcfddad25114d69f0ea23cc3caf55ef9e7ce6e7.tar.zst mandoc-dfcfddad25114d69f0ea23cc3caf55ef9e7ce6e7.zip |
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 | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.280 2019/01/15 12:16:18 schwarze Exp $ */ +/* $Id: term.c,v 1.281 2019/06/03 20:23:41 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org> @@ -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) |