File 0024-nvme-ana-log-fixup-compiler-warning-in-show_ana_log.patch of Package nvme-cli.11415
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 17 Aug 2018 09:29:03 +0200
Subject: [PATCH] nvme-ana-log: fixup compiler warning in show_ana_log()
References: bsc#1113400
Git-commit: f637e2b7da0b57f97075c6238c7fb4e4bbe178cc
Add the correct type cast to keep the compiler happy.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
nvme-print.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/nvme-print.c b/nvme-print.c
index e0da949..8a604c5 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -1460,7 +1460,8 @@ void show_ana_log(struct nvme_ana_rsp_hdr *ana_log, const char *devname)
offset += sizeof(*desc);
printf("grpid : %u\n", le32_to_cpu(desc->grpid));
printf("nnsids : %u\n", le32_to_cpu(desc->nnsids));
- printf("chgcnt : %"PRIu64"\n", le64_to_cpu(desc->chgcnt));
+ printf("chgcnt : %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(desc->chgcnt));
printf("state : %s\n",
nvme_ana_state_to_string(desc->state));
for (j = 0; j < le32_to_cpu(desc->nnsids); j++)
--
2.16.4