nvme: silence conversion error in spdk_nvme_opc_get_data_transfer()

Including nvme_spec.h in a C++ source file and compiling with -Wall
results in an invalid conversion warning when implicitly casting
from int to enum spdk_nvme_data_transfer.  So add an explciit cast
to silence the warning.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I54fefeb03b13ff47baa2bcff830330c2b2963493
This commit is contained in:
Jim Harris 2016-09-08 12:13:34 -07:00
parent f9967879c6
commit 8aa5539ee4

View File

@ -631,7 +631,7 @@ enum spdk_nvme_data_transfer {
*/
static inline enum spdk_nvme_data_transfer spdk_nvme_opc_get_data_transfer(uint8_t opc)
{
return opc & 3;
return (enum spdk_nvme_data_transfer)(opc & 3);
}
enum spdk_nvme_feat {