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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to