Re: git: d2be7ed63aff - main - cred: proc_set_cred(), proc_unset_cred(): Update user's process count
- Reply: Olivier Certner : "Re: git: d2be7ed63aff - main - cred: proc_set_cred(), proc_unset_cred(): Update user's process count"
- In reply to: Olivier Certner : "Re: git: d2be7ed63aff - main - cred: proc_set_cred(), proc_unset_cred(): Update user's process count"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Dec 2024 15:29:36 UTC
In message <8184418.bYQgcRI8ro@ravel>, Olivier Certner writes: > --nextPart2531687.0dHE6SNnxz > Content-Transfer-Encoding: 7Bit > Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" > From: Olivier Certner <olce@freebsd.org> > To: Baptiste Daroussin <bapt@freebsd.org> > Date: Mon, 16 Dec 2024 16:26:32 +0100 > Message-ID: <8184418.bYQgcRI8ro@ravel> > MIME-Version: 1.0 > > > This breaks build for GERNERIC-NODEBUG > > Ah sorry, going to fix that. > > Thanks and regards. > I was just about to push this: From e138ba250999b73166b62887dee80c770da32f25 Mon Sep 17 00:00:00 2001 From: Cy Schubert <cy@FreeBSD.org> Date: Mon, 16 Dec 2024 07:12:18 -0800 Subject: [PATCH] New setcred(): Fix non-INVARIANTS build Fix, --- kern_prot.o --- /opt/src/git-src/sys/kern/kern_prot.c:2697:7: error: unused variable 'success' [-Werror,-Wunused-variable] 2697 | bool success = _proc_set_cred(p, newcred, false); | Fixes: ddb3eb4efe55 --- sys/kern/kern_prot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 8edbb7f18f1a..b5af6dc547d4 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2694,7 +2694,10 @@ _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); +#ifdef INVARIANTS + bool success = +#endif + _proc_set_cred(p, newcred, false); MPASS(success); } -- 2.47.1 -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org e^(i*pi)+1=0