svn commit: r233710 - head/sys/dev/isci

Dimitry Andric dim at FreeBSD.org
Fri Mar 30 22:52:09 UTC 2012


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;


More information about the svn-src-all mailing list