Date: Mon, 9 Jul 2018 20:27:32 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336143 - head/usr.bin/sed Message-ID: <201807092027.w69KRWfX040530@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Jul 9 20:27:31 2018 New Revision: 336143 URL: https://svnweb.freebsd.org/changeset/base/336143 Log: 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 Modified: head/usr.bin/sed/main.c Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Mon Jul 9 20:00:45 2018 (r336142) +++ head/usr.bin/sed/main.c Mon Jul 9 20:27:31 2018 (r336143) @@ -250,6 +250,8 @@ again: s = script->s; state = ST_STRING; goto again; + default: + __unreachable(); } case ST_FILE: if ((p = fgets(buf, n, f)) != NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807092027.w69KRWfX040530>