Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 20:04:38 +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: r299973 - head/sys/dev/ow
Message-ID:  <201605162004.u4GK4cOT019444@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605162004.u4GK4cOT019444>