Date: Fri, 13 Apr 2012 21:50:14 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r234239 - stable/9/sys/dev/isci Message-ID: <201204132150.q3DLoEGm098784@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Apr 13 21:50:14 2012 New Revision: 234239 URL: http://svn.freebsd.org/changeset/base/234239 Log: MFC r233710: 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 Modified: stable/9/sys/dev/isci/isci_task_request.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/isci/isci_task_request.c ============================================================================== --- stable/9/sys/dev/isci/isci_task_request.c Fri Apr 13 21:47:14 2012 (r234238) +++ stable/9/sys/dev/isci/isci_task_request.c Fri Apr 13 21:50:14 2012 (r234239) @@ -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?201204132150.q3DLoEGm098784>