Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Oct 2022 22:33:42 +0100
From:      Kristof Provost <kp@freebsd.org>
To:        Cy Schubert <cy@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: a7b568109ec7 - main - nvmecontrol: Fix i386 build
Message-ID:  <265ACE07-5B60-45FA-8B17-2F8A9A2A6F15@freebsd.org>
In-Reply-To: <202210061837.296Iblrk093109@gitrepo.freebsd.org>
References:  <202210061837.296Iblrk093109@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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)));
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?265ACE07-5B60-45FA-8B17-2F8A9A2A6F15>