From ef195046e60def3f6de6b879bec45de18894e56a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 3 Jun 2019 20:23:41 +0000 Subject: 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 reported that gcc 4.4.4 and 7.4.0 on illumos throw -Wuninitialized false positives. --- term.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit