]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the following compilation warning with clang trunk in isci(4):
authordim <dim@FreeBSD.org>
Fri, 30 Mar 2012 22:52:08 +0000 (22:52 +0000)
committerdim <dim@FreeBSD.org>
Fri, 30 Mar 2012 22:52:08 +0000 (22:52 +0000)
commit8251950705577f472f1a2c4052195c05c3e41d32
treee1829bf54a2828fe578e8f03fb4de2ef61595664
parent98a50d54e52d23d301e1d7f73f41cd564c3d9671
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
sys/dev/isci/isci_task_request.c