git: c3c880be15a4 - stable/13 - uipc_shm: silent warnings about write-only variables in largepage code

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 27 Oct 2021 00:45:22 UTC
The branch stable/13 has been updated by kib:

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

commit c3c880be15a40985268f018c7828f8b98dfa93be
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-10-21 17:46:36 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-10-27 00:24:41 +0000

    uipc_shm: silent warnings about write-only variables in largepage code
    
    (cherry picked from commit 3b5331dd8d413807cf1d6cb26630ccf9028168e6)
---
 sys/kern/uipc_shm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c
index 622886e15e58..7823e92378b0 100644
--- a/sys/kern/uipc_shm.c
+++ b/sys/kern/uipc_shm.c
@@ -263,7 +263,7 @@ static int
 shm_largepage_phys_populate(vm_object_t object, vm_pindex_t pidx,
     int fault_type, vm_prot_t max_prot, vm_pindex_t *first, vm_pindex_t *last)
 {
-	vm_page_t m;
+	vm_page_t m __diagused;
 	int psind;
 
 	psind = object->un_pager.phys.data_val;
@@ -733,7 +733,8 @@ shm_dotruncate_largepage(struct shmfd *shmfd, off_t length, void *rl_cookie)
 {
 	vm_object_t object;
 	vm_page_t m;
-	vm_pindex_t newobjsz, oldobjsz;
+	vm_pindex_t newobjsz;
+	vm_pindex_t oldobjsz __unused;
 	int aflags, error, i, psind, try;
 
 	KASSERT(length >= 0, ("shm_dotruncate: length < 0"));