diff options
author | dim <dim@FreeBSD.org> | 2012-03-30 22:52:08 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-03-30 22:52:08 +0000 |
commit | 8251950705577f472f1a2c4052195c05c3e41d32 (patch) | |
tree | e1829bf54a2828fe578e8f03fb4de2ef61595664 | |
parent | 98a50d54e52d23d301e1d7f73f41cd564c3d9671 (diff) | |
download | FreeBSD-src-8251950705577f472f1a2c4052195c05c3e41d32.zip FreeBSD-src-8251950705577f472f1a2c4052195c05c3e41d32.tar.gz |
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
-rw-r--r-- | sys/dev/isci/isci_task_request.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/isci/isci_task_request.c b/sys/dev/isci/isci_task_request.c index 25995ad..4ad0731 100644 --- a/sys/dev/isci/isci_task_request.c +++ b/sys/dev/isci/isci_task_request.c @@ -188,7 +188,7 @@ isci_task_request_complete(SCI_CONTROLLER_HANDLE_T scif_controller, isci_remote_device->is_resetting = FALSE; - switch (completion_status) { + switch ((int)completion_status) { case SCI_TASK_SUCCESS: case SCI_TASK_FAILURE_RESPONSE_VALID: break; |