From e8c840ea37a6eab377860b809c536f0f1f5399ca Mon Sep 17 00:00:00 2001 From: cions Date: Wed, 13 Apr 2022 01:38:56 +0900 Subject: [PATCH] ioctl.h: Fix clang -Wc++11-narrowing error Signed-off-by: Joh Matsuura --- src/nvme/ioctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nvme/ioctl.h b/src/nvme/ioctl.h index ab3797d2..0abbd3a3 100644 --- a/src/nvme/ioctl.h +++ b/src/nvme/ioctl.h @@ -1647,7 +1647,7 @@ static int nvme_get_log_ana(int fd, enum nvme_log_ana_lsp lsp, bool rae, .nsid = NVME_NSID_NONE, .csi = NVME_CSI_NVM, .lsi = NVME_LOG_LSI_NONE, - .lsp = lsp, + .lsp = (__u8)lsp, .uuidx = NVME_UUID_NONE, .rae = false, .ot = false, @@ -1990,7 +1990,7 @@ static inline int nvme_get_log_persistent_event(int fd, .nsid = NVME_NSID_ALL, .csi = NVME_CSI_NVM, .lsi = NVME_LOG_LSI_NONE, - .lsp = action, + .lsp = (__u8)action, .uuidx = NVME_UUID_NONE, .rae = false, .ot = false, @@ -2502,7 +2502,7 @@ static inline int nvme_get_features_data(int fd, enum nvme_features_id fid, .sel = NVME_GET_FEATURES_SEL_CURRENT, .cdw11 = 0, .data_len = data_len, - .fid = fid, + .fid = (__u8)fid, .uuidx = NVME_UUID_NONE, }; @@ -4323,7 +4323,7 @@ static inline int nvme_zns_report_zones(int fd, __u32 nsid, __u64 slba, .zra = extended ? NVME_ZNS_ZRA_EXTENDED_REPORT_ZONES : NVME_ZNS_ZRA_REPORT_ZONES, .data_len = data_len, - .zrasf = opts, + .zrasf = (__u16)opts, .zras_feat = partial, }; -- 2.50.1