git: 142c3c7fefed - main - nvmecontrol: Apply cast

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 06 Oct 2022 18:58:30 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=142c3c7fefed51c0766c24e776a773fec7557050

commit 142c3c7fefed51c0766c24e776a773fec7557050
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-10-06 18:56:11 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-10-06 18:58:16 +0000

    nvmecontrol: Apply cast
    
    The proper fix also casts to uintmax_t.
    
    Reported by:    imp
    Fixes:          a7b568109ec7
---
 sbin/nvmecontrol/modules/samsung/samsung.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/nvmecontrol/modules/samsung/samsung.c b/sbin/nvmecontrol/modules/samsung/samsung.c
index 75d8e1064c93..497acf46e01c 100644
--- a/sbin/nvmecontrol/modules/samsung/samsung.c
+++ b/sbin/nvmecontrol/modules/samsung/samsung.c
@@ -146,8 +146,8 @@ print_samsung_extended_smart(const struct nvme_controller_data *cdata __unused,
 	print_temp(le16dec(&temp->ct));
 	printf("   Capacitor Health                         : %u\n", le16dec(&temp->ch));
 	printf("   Reserved Erase Block Count               : %u\n", le32dec(&temp->luurb));
-	printf("   Read Reclaim Count                       : %ju\n", le64dec(&temp->rrc));
-	printf("   Lifetime Uncorrectable ECC Count         : %ju\n", le64dec(&temp->lueccc));
+	printf("   Read Reclaim Count                       : %ju\n", (uintmax_t) le64dec(&temp->rrc));
+	printf("   Lifetime Uncorrectable ECC Count         : %ju\n", (uintmax_t) le64dec(&temp->lueccc));
 	printf("   Reallocated Block Count                  : %u\n", le32dec(&temp->lurb));
 	printf("   Power on Hours                           : %s\n",
 	    uint128_to_str(to128(temp->poh), cbuf, sizeof(cbuf)));