From nobody Wed Apr 20 00:17:53 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 413D611E03BB; Wed, 20 Apr 2022 00:18:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kjh8T6mH8z3qbt; Wed, 20 Apr 2022 00:18:01 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 23K0Hr0l007270; Tue, 19 Apr 2022 17:17:53 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 23K0HruW007269; Tue, 19 Apr 2022 17:17:53 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202204200017.23K0HruW007269@gndrsh.dnsmgr.net> Subject: Re: git: 8b83d7e0ee54 - main - Make -Wunused-but-set-variable a fatal error for clang 13+ for kernel builds. In-Reply-To: To: Mateusz Guzik Date: Tue, 19 Apr 2022 17:17:53 -0700 (PDT) CC: Stefan Esser , John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Kjh8T6mH8z3qbt X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N > Looks like this needs a pass on a kernel without AUDIT, MAC, > CAPABILITIES, dtrace and probably some other default stuff which also > happens to be enabled in all kernel built with tinderbox. You might want to contact Michael Dexter and ask if he could run a "Build Option Survey" with and without these changes to see how much fallout that shows. > On 4/19/22, Stefan Esser wrote: > > Am 19.04.22 um 01:11 schrieb John Baldwin: > >> The branch main has been updated by jhb: > >> > >> URL: > >> https://cgit.FreeBSD.org/src/commit/?id=8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1 > >> > >> commit 8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1 > >> Author: John Baldwin > >> AuthorDate: 2022-04-18 23:06:27 +0000 > >> Commit: John Baldwin > >> CommitDate: 2022-04-18 23:06:27 +0000 > >> > >> Make -Wunused-but-set-variable a fatal error for clang 13+ for kernel > >> builds. > >> > >> Reviewed by: imp, emaste > >> Differential Revision: https://reviews.freebsd.org/D34949 > > > > I'm seeing kernel build issues in several drivers (at commit f2edc9155721). > > > > The first one could be fixed this way: > > > > diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c > > index 4c8b1fa27579..470f03313b72 100644 > > --- a/sys/dev/cxgbe/tom/t4_cpl_io.c > > +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c > > @@ -2192,7 +2192,7 @@ static void > > t4_aiotx_process_job(struct toepcb *toep, struct socket *so, struct kaiocb > > *job) > > { > > struct sockbuf *sb; > > +#ifdef MAC > > struct file *fp; > > +#endif > > struct inpcb *inp; > > struct tcpcb *tp; > > struct mbuf *m; > > @@ -2201,10 +2201,10 @@ t4_aiotx_process_job(struct toepcb *toep, struct > > socket > > *so, struct kaiocb *job) > > > > sb = &so->so_snd; > > SOCKBUF_UNLOCK(sb); > > - fp = job->fd_file; > > m = NULL; > > > > #ifdef MAC > > + fp = job->fd_file; > > error = mac_socket_check_send(fp->f_cred, so); > > if (error != 0) > > goto out; > > > > But then the build failed again at: > > > > /usr/src/sys/fs/ext2fs/ext2_extents.c:452:8: error: variable 'error_msg' > > set > > but not used [-Werror,-Wunused-but-set-variable] > > Building /usr/obj/usr-14/git/src/amd64.amd64/sys/SE/vdev_mirror.o > > > > I have stopped trying to fix this and (any remaining) issues and have > > locally reverted the commit that made this warning fatal ... > > > > Regards, STefan > > > > > -- > Mateusz Guzik > -- Rod Grimes rgrimes@freebsd.org