Re: git: a7b568109ec7 - main - nvmecontrol: Fix i386 build
- In reply to: Cy Schubert : "git: a7b568109ec7 - main - nvmecontrol: Fix i386 build"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Oct 2022 21:33:42 UTC
Thanks.
I had a make universe running to test the same fix, but got ambushed by dinner and haven’t been able to commit yet.
Kristof
> On 6 Oct 2022, at 19:37, Cy Schubert <cy@freebsd.org> wrote:
>
> The branch main has been updated by cy:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=a7b568109ec74fbbd49a16c99e7e3ba584ab0eac
>
> commit a7b568109ec74fbbd49a16c99e7e3ba584ab0eac
> Author: Cy Schubert <cy@FreeBSD.org>
> AuthorDate: 2022-10-06 17:56:48 +0000
> Commit: Cy Schubert <cy@FreeBSD.org>
> CommitDate: 2022-10-06 18:26:50 +0000
>
> nvmecontrol: Fix i386 build
>
> Fix:
>
> --- all_subdir_sbin ---
> /opt/src/git-src/sbin/nvmecontrol/modules/samsung/samsung.c:149:64:
> error: format specifies type 'unsigned long' but the argument has type
> 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
> printf(" Read Reclaim Count : %lu\n",
> le64dec(&temp->rrc));
> ~~~
> ^~~~~~~~~~~~~~~~~~~
> %llu
> /opt/src/git-src/sbin/nvmecontrol/modules/samsung/samsung.c:150:64:
> error: forma t specifies type 'unsigned long' but the argument has type
> 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
> printf(" Lifetime Uncorrectable ECC Count : %lu\n",
> le64dec(&temp->lueccc));
> ~~~
> ^~~~~~~~~~~~~~~~~~~~~~
> %llu
> 2 errors generated.
>
> Fixes: 84e86788705c176cc195e4a9831c0be08dcece31
> ---
> 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 50f0a89db13b..75d8e1064c93 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 : %lu\n", le64dec(&temp->rrc));
> - printf(" Lifetime Uncorrectable ECC Count : %lu\n", le64dec(&temp->lueccc));
> + printf(" Read Reclaim Count : %ju\n", le64dec(&temp->rrc));
> + printf(" Lifetime Uncorrectable ECC Count : %ju\n", 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)));
>