From: Daniel Wagner Date: Wed, 22 Mar 2023 16:17:42 +0000 (+0100) Subject: plugins/inspur: Cast vendor specific smart log value X-Git-Tag: v2.4~20 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=40733fbebd4cb6088cff653772394d0cdb4f2e88;p=users%2Fsagi%2Fnvme-cli.git plugins/inspur: Cast vendor specific smart log value nvme_get_log_simple expects an 'enum nvme_cmd_get_log_lid' type. Cast the vendor specific value as clang reports this as warning. Signed-off-by: Daniel Wagner --- diff --git a/plugins/inspur/inspur-nvme.c b/plugins/inspur/inspur-nvme.c index 9d7bb4dc..8c929aa0 100644 --- a/plugins/inspur/inspur-nvme.c +++ b/plugins/inspur/inspur-nvme.c @@ -222,7 +222,9 @@ static int nvme_get_vendor_log(int argc, char **argv, struct command *cmd, struc return err; memset(local_mem, 0, BYTE_OF_4K); - err = nvme_get_log_simple(dev_fd(dev), VENDOR_SMART_LOG_PAGE, sizeof(r1_cli_vendor_log_t), local_mem); + err = nvme_get_log_simple(dev_fd(dev), + (enum nvme_cmd_get_log_lid)VENDOR_SMART_LOG_PAGE, + sizeof(r1_cli_vendor_log_t), local_mem); if (!err) { show_r1_vendor_log((r1_cli_vendor_log_t *)local_mem); show_r1_media_err_log((r1_cli_vendor_log_t *)local_mem);