From 5ad3ea1cb26ec68c24611629e80b4312f35e0cf6 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 23 Sep 2022 13:43:57 +0200 Subject: [PATCH] plugins/wdc: Add type case for feature id clang reports ../plugins/wdc/wdc-nvme.c:9000:36: warning: implicit conversion from enumeration type 'NVME_FEATURE_IDENTIFIERS' (aka 'enum _NVME_FEATURE_IDENTIFIERS') to different enumeration type 'enum nvme_features_id' [-Wenum-conversion] deFeatureIdList[listIdx].featureId, ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ Add type case to avoid the warning. Ideally, the plugin would not introduce their own enum value. Signed-off-by: Daniel Wagner --- plugins/wdc/wdc-nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c index a5333eda..8b327b34 100644 --- a/plugins/wdc/wdc-nvme.c +++ b/plugins/wdc/wdc-nvme.c @@ -8997,7 +8997,7 @@ static int wdc_do_drive_essentials(nvme_root_t r, struct nvme_dev *dev, if (deFeatureIdList[listIdx].featureId == FID_LBA_RANGE_TYPE) continue; ret = nvme_get_features_data(dev_fd(dev), - deFeatureIdList[listIdx].featureId, + (enum nvme_features_id)deFeatureIdList[listIdx].featureId, WDC_DE_GLOBAL_NSID, sizeof(featureIdBuff), &featureIdBuff, &result); -- 2.50.1