Skip to content

Commit cde4a45

Browse files
authored
Merge pull request #342 from cions/fix-cxx11-narrowing
ioctl.h: Fix clang -Wc++11-narrowing error
2 parents 99d120e + e8c840e commit cde4a45

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/nvme/ioctl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ static int nvme_get_log_ana(int fd, enum nvme_log_ana_lsp lsp, bool rae,
16471647
.nsid = NVME_NSID_NONE,
16481648
.csi = NVME_CSI_NVM,
16491649
.lsi = NVME_LOG_LSI_NONE,
1650-
.lsp = lsp,
1650+
.lsp = (__u8)lsp,
16511651
.uuidx = NVME_UUID_NONE,
16521652
.rae = false,
16531653
.ot = false,
@@ -1990,7 +1990,7 @@ static inline int nvme_get_log_persistent_event(int fd,
19901990
.nsid = NVME_NSID_ALL,
19911991
.csi = NVME_CSI_NVM,
19921992
.lsi = NVME_LOG_LSI_NONE,
1993-
.lsp = action,
1993+
.lsp = (__u8)action,
19941994
.uuidx = NVME_UUID_NONE,
19951995
.rae = false,
19961996
.ot = false,
@@ -2502,7 +2502,7 @@ static inline int nvme_get_features_data(int fd, enum nvme_features_id fid,
25022502
.sel = NVME_GET_FEATURES_SEL_CURRENT,
25032503
.cdw11 = 0,
25042504
.data_len = data_len,
2505-
.fid = fid,
2505+
.fid = (__u8)fid,
25062506
.uuidx = NVME_UUID_NONE,
25072507
};
25082508

@@ -4323,7 +4323,7 @@ static inline int nvme_zns_report_zones(int fd, __u32 nsid, __u64 slba,
43234323
.zra = extended ? NVME_ZNS_ZRA_EXTENDED_REPORT_ZONES :
43244324
NVME_ZNS_ZRA_REPORT_ZONES,
43254325
.data_len = data_len,
4326-
.zrasf = opts,
4326+
.zrasf = (__u16)opts,
43274327
.zras_feat = partial,
43284328
};
43294329

0 commit comments

Comments
 (0)