svn commit: r336143 - head/usr.bin/sed

Pedro F. Giffuni pfg at FreeBSD.org
Mon Jul 9 20:27:33 UTC 2018


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) {


More information about the svn-src-head mailing list