Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 May 2022 13:12:54 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Ruslan Bukin <br@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 59446e8ac008 - main - Fix !INVARIANTS build.
Message-ID:  <0c5690e1-1fcb-a6dd-b827-6ed6006e1166@FreeBSD.org>
In-Reply-To: <202205070946.2479kIx1015235@gitrepo.freebsd.org>
References:  <202205070946.2479kIx1015235@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5/7/22 2:46 AM, Ruslan Bukin wrote:
> The branch main has been updated by br:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=59446e8ac0087eb91fd8b7238cbfd10f06a8ed2d
> 
> commit 59446e8ac0087eb91fd8b7238cbfd10f06a8ed2d
> Author:     Ruslan Bukin <br@FreeBSD.org>
> AuthorDate: 2022-05-07 09:44:54 +0000
> Commit:     Ruslan Bukin <br@FreeBSD.org>
> CommitDate: 2022-05-07 09:45:33 +0000
> 
>      Fix !INVARIANTS build.
>      
>      Sponsored by:   UKRI
> ---
>   sys/arm64/iommu/iommu.c      | 4 +---
>   sys/arm64/iommu/iommu_pmap.c | 8 +++++---
>   2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c
> index e7f51e8693a1..690c11f4777c 100644
> --- a/sys/arm64/iommu/iommu.c
> +++ b/sys/arm64/iommu/iommu.c
> @@ -299,9 +299,7 @@ iommu_domain_unload(struct iommu_domain *iodom,
>       struct iommu_map_entries_tailq *entries, bool cansleep)
>   {
>   	struct iommu_map_entry *entry, *entry1;
> -#ifdef INVARIANTS
> -	int error;
> -#endif
> +	int error __unused;
>   
>   	TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) {
>   		KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0,

If this variable is only used under INVARIANTS, please use __diagused rather
than __unused.  Similarly for the other variables you marked __unused here.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0c5690e1-1fcb-a6dd-b827-6ed6006e1166>