Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2012 22:52:09 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233710 - head/sys/dev/isci
Message-ID:  <201203302252.q2UMq9ut061352@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Mar 30 22:52:08 2012
New Revision: 233710
URL: http://svn.freebsd.org/changeset/base/233710

Log:
  Fix the following compilation warning with clang trunk in isci(4):
  
    sys/dev/isci/isci_task_request.c:198:7: error: case value not in enumerated type 'SCI_TASK_STATUS' (aka 'enum _SCI_TASK_STATUS') [-Werror,-Wswitch]
      case SCI_FAILURE_TIMEOUT:
             ^
  
  This is because the switch is done on a SCI_TASK_STATUS enum type, but
  the SCI_FAILURE_TIMEOUT value belongs to SCI_STATUS instead.
  
  Because the list of SCI_TASK_STATUS values cannot be modified at this
  time, use the simplest way to get rid of this warning, which is to cast
  the switch argument to int.  No functional change.
  
  Reviewed by:	jimharris
  MFC after:	3 days

Modified:
  head/sys/dev/isci/isci_task_request.c

Modified: head/sys/dev/isci/isci_task_request.c
==============================================================================
--- head/sys/dev/isci/isci_task_request.c	Fri Mar 30 20:17:39 2012	(r233709)
+++ head/sys/dev/isci/isci_task_request.c	Fri Mar 30 22:52:08 2012	(r233710)
@@ -188,7 +188,7 @@ isci_task_request_complete(SCI_CONTROLLE
 
 	isci_remote_device->is_resetting = FALSE;
 
-	switch (completion_status) {
+	switch ((int)completion_status) {
 	case SCI_TASK_SUCCESS:
 	case SCI_TASK_FAILURE_RESPONSE_VALID:
 		break;



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