Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 20:00:09 +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: r299972 - head/sys/boot/efi/libefi
Message-ID:  <201605162000.u4GK09c0016573@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Mon May 16 20:00:09 2016
New Revision: 299972
URL: https://svnweb.freebsd.org/changeset/base/299972

Log:
  libefi: Tag an unreachable switch default.
  
  Coverity reports an uninitialized "len" 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:	1347796

Modified:
  head/sys/boot/efi/libefi/efi_console.c

Modified: head/sys/boot/efi/libefi/efi_console.c
==============================================================================
--- head/sys/boot/efi/libefi/efi_console.c	Mon May 16 19:48:02 2016	(r299971)
+++ head/sys/boot/efi/libefi/efi_console.c	Mon May 16 20:00:09 2016	(r299972)
@@ -266,6 +266,8 @@ CL(int direction)
 	case 2:         /* entire line */
 		len = x;
 		break;
+	default:	/* NOTREACHED */
+		__unreachable();
 	}
 
 	if (cury == y - 1)



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