Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2022 13:08:20 +0200
From:      Stefan Esser <se@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 8b83d7e0ee54 - main - Make -Wunused-but-set-variable a fatal error for clang 13+ for kernel builds.
Message-ID:  <960b9be3-c3b5-bd48-8038-97511f2f7909@FreeBSD.org>
In-Reply-To: <202204182311.23INBqfC025671@gitrepo.freebsd.org>
References:  <202204182311.23INBqfC025671@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------rkd0gpIA3bxev9OJKv8FhvEO
Content-Type: multipart/mixed; boundary="------------HZ2UMqEig5zZ03gEPFti4BiZ";
 protected-headers="v1"
From: Stefan Esser <se@FreeBSD.org>
To: John Baldwin <jhb@FreeBSD.org>, src-committers@FreeBSD.org,
 dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Message-ID: <960b9be3-c3b5-bd48-8038-97511f2f7909@FreeBSD.org>
Subject: Re: git: 8b83d7e0ee54 - main - Make -Wunused-but-set-variable a fatal
 error for clang 13+ for kernel builds.
References: <202204182311.23INBqfC025671@gitrepo.freebsd.org>
In-Reply-To: <202204182311.23INBqfC025671@gitrepo.freebsd.org>

--------------HZ2UMqEig5zZ03gEPFti4BiZ
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am 19.04.22 um 01:11 schrieb John Baldwin:
> The branch main has been updated by jhb:
>=20
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D8b83d7e0ee54416b0ee58bd8=
5f9c0ae7fb3357a1
>=20
> commit 8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1
> Author:     John Baldwin <jhb@FreeBSD.org>
> AuthorDate: 2022-04-18 23:06:27 +0000
> Commit:     John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2022-04-18 23:06:27 +0000
>=20
>     Make -Wunused-but-set-variable a fatal error for clang 13+ for kern=
el builds.
>    =20
>     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 kaio=
cb *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 =3D &so->so_snd;
        SOCKBUF_UNLOCK(sb);
-       fp =3D job->fd_file;
        m =3D NULL;

 #ifdef MAC
+       fp =3D job->fd_file;
        error =3D mac_socket_check_send(fp->f_cred, so);
        if (error !=3D 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

--------------HZ2UMqEig5zZ03gEPFti4BiZ--

--------------rkd0gpIA3bxev9OJKv8FhvEO
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmJemCQFAwAAAAAACgkQR+u171r99URF
9gf/Qv9cVZzz2qYxZcqRPkpuxvVLP1Ro4uCGzUBKmbip1G3vn6Mkd9Eq7T9ALNECvOj3BueMD13p
1MGjiASQYxozhTLpeCmXHDYrGLIEYk//u16ksEu5u1qJa3p7IErBfmgcLyDl3sZO51qGrGFe2/HW
qz+rE3KgoSoRG/Qx1QycBuDgqdRJS1dujHuWUqjGtBUHkH+Bz9gIdY2sB5kBvoMOKLRMXxlNktVi
MdPDi3jFL8wiyWCVfBHPQqnElLBoxSCJC4IKBBw0Kofq25z5NpXqnGEP3C2Hy0Y0hvI+OkFlzpOc
UqDRx2GxHgO4gTkh4WRqdREA6XvIwxeFVtY9shyETA==
=2Rh/
-----END PGP SIGNATURE-----

--------------rkd0gpIA3bxev9OJKv8FhvEO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?960b9be3-c3b5-bd48-8038-97511f2f7909>