From 51a8f735f8e0bc377077a1221fd4feac40c9a00e Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Mon, 9 Jul 2018 20:27:31 +0000 Subject: [PATCH] sed(1): Suppress implicit-fallthrough. Apparently some tools are not able to determine if all the cases of a switch are covered. Make use of the attribute for cases like this. Hinted by: DragonFlyBSD GGC8 (but fixed differently) CID: 976552 --- usr.bin/sed/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index d54a7c11d1a7..e48c85ea9ae4 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -250,6 +250,8 @@ cu_fgets(char *buf, int n, int *more) s = script->s; state = ST_STRING; goto again; + default: + __unreachable(); } case ST_FILE: if ((p = fgets(buf, n, f)) != NULL) {