git: 22e8819388ee - stable/14 - proc_set_cred(): Fix compilation of GENERIC-NODEBUG

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Thu, 16 Jan 2025 18:08:35 UTC
The branch stable/14 has been updated by olce:

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

commit 22e8819388ee0495bb02a31e888ea4c0f0b11dab
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-12-16 15:38:26 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-01-16 18:07:01 +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")
    
    (cherry picked from commit 675708aa402a06d9ced98c8a12d9ef29625d3c66)
---
 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 7c5ce97fef93..3f1d28376d49 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2339,7 +2339,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);
 }