aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
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
commitdfcfddad25114d69f0ea23cc3caf55ef9e7ce6e7 (patch)
treeeca8be4b0197ea26dfe71cdb469437816bb32bbd /term.c
parent8238052233df39761f179f81db886271c18f4cd4 (diff)
downloadmandoc-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.
Diffstat (limited to 'term.c')
-rw-r--r--term.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/term.c b/term.c
index 8e976228..3b9277aa 100644
--- a/term.c
+++ b/term.c
@@ -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)