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 <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409963
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Daniel Verkamp 2018-05-03 16:43:29 -07:00
parent 6cfddbc71d
commit 87295c3c2c

View File

@ -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;