git: 675708aa402a - main - proc_set_cred(): Fix compilation of GENERIC-NODEBUG

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Mon, 16 Dec 2024 15:41:29 UTC
The branch main has been updated by olce:

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

commit 675708aa402a06d9ced98c8a12d9ef29625d3c66
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-12-16 15:38:26 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2024-12-16 15:39:54 +0000

    proc_set_cred(): Fix compilation of GENERIC-NODEBUG
    
    Approved by:    mark (mentor)
    Fixes:          d2be7ed63aff ("cred: proc_set_cred(), proc_unset_cred(): Update user's process count")
---
 sys/kern/kern_prot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 8edbb7f18f1a..2517b2bc2d4d 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2694,7 +2694,7 @@ _proc_set_cred(struct proc *p, struct ucred *newcred, bool enforce_proc_lim)
 void
 proc_set_cred(struct proc *p, struct ucred *newcred)
 {
-	bool success = _proc_set_cred(p, newcred, false);
+	bool success __diagused = _proc_set_cred(p, newcred, false);
 
 	MPASS(success);
 }