From 87295c3c2c4c164e8c0d21eb051dad437208d055 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 3 May 2018 16:43:29 -0700 Subject: [PATCH] bdev/iscsi: silence clang enum conversion warning This assignment is converting from the libiscsi sense key enumerated type to the SPDK one, and clang issues a warning for this case. We know that these enums are equivalent, so just add a cast to avoid the warning. Change-Id: Ie2619b3ddeda46419df1a37755125bfeb6ddf636 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/409963 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- lib/bdev/iscsi/bdev_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bdev/iscsi/bdev_iscsi.c b/lib/bdev/iscsi/bdev_iscsi.c index 835733f781..58f884ebfd 100644 --- a/lib/bdev/iscsi/bdev_iscsi.c +++ b/lib/bdev/iscsi/bdev_iscsi.c @@ -214,7 +214,7 @@ bdev_iscsi_rw_cb(struct iscsi_context *context, int status, void *_task, void *_ struct bdev_iscsi_io *iscsi_io = _iscsi_io; iscsi_io->scsi_status = task->status; - iscsi_io->sk = task->sense.key; + iscsi_io->sk = (uint8_t)task->sense.key; iscsi_io->asc = (task->sense.ascq >> 8) & 0xFF; iscsi_io->ascq = task->sense.ascq & 0xFF;