svn commit: r299973 - head/sys/dev/ow

Pedro F. Giffuni pfg at FreeBSD.org
Mon May 16 20:04:39 UTC 2016


Author: pfg
Date: Mon May 16 20:04:38 2016
New Revision: 299973
URL: https://svnweb.freebsd.org/changeset/base/299973

Log:
  dev/ow: Tag an unreachable switch default.
  
  Coverity reports an uninitialized "dir" in case the switch defaults
  without hitting any case. Respect the original intent and quell the
  false positive with the relatively new __unreachable() builtin.
  
  CID:	1331566

Modified:
  head/sys/dev/ow/ow.c

Modified: head/sys/dev/ow/ow.c
==============================================================================
--- head/sys/dev/ow/ow.c	Mon May 16 20:00:09 2016	(r299972)
+++ head/sys/dev/ow/ow.c	Mon May 16 20:04:38 2016	(r299973)
@@ -401,6 +401,8 @@ again:
 				if (++retries > 5)
 					return (EIO);
 				goto again;
+			default: /* NOTREACHED */
+				__unreachable();
 			}
 			if (dir) {
 				OWLL_WRITE_ONE(lldev, &timing_regular);


More information about the svn-src-head mailing list