Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2022 15:45:55 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Michael Butler <imb@protected-networks.net>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: 'set but unused' breaks drm-*-kmod
Message-ID:  <20220421154555.8a69a542d97d6cf36472b75f@bidouilliste.com>
In-Reply-To: <e6731f8c-0faf-341b-8215-d1a48dedcdd1@protected-networks.net>
References:  <263e16c4-0634-88e6-9652-50d0874f027e@protected-networks.net> <20220421094236.3f023ac540666c140c04f884@bidouilliste.com> <e6731f8c-0faf-341b-8215-d1a48dedcdd1@protected-networks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 21 Apr 2022 08:51:26 -0400
Michael Butler <imb@protected-networks.net> wrote:

> On 4/21/22 03:42, Emmanuel Vadot wrote:
> > 
> >   Hello Michael,
> > 
> > On Wed, 20 Apr 2022 23:39:12 -0400
> > Michael Butler <imb@protected-networks.net> wrote:
> > 
> >> Seems this new requirement breaks kmod builds too ..
> >>
> >> The first of many errors was (I stopped chasing them all for lack of
> >> time) ..
> >>
> >> --- amdgpu_cs.o ---
> >> /usr/ports/graphics/drm-devel-kmod/work/drm-kmod-drm_v5.7.19_3/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1210:26:
> >> error: variable 'priority' set but not used
> >> [-Werror,-Wunused-but-set-variable]
> >>           enum drm_sched_priority priority;
> >>                                   ^
> >> 1 error generated.
> >> *** [amdgpu_cs.o] Error code 1
> >>
> > 
> >   How are you building the port, directly or with PORTS_MODULES ?
> >   I do make passes on the warning for drm and I did for set-but-not-used
> > case but unfortunately this option doesn't exists in 13.0 so I couldn't
> > apply those in every branch.
> 
> I build this directly on -current. I'm guessing that these are what 
> triggered this behaviour:
> 
> commit 8b83d7e0ee54416b0ee58bd85f9c0ae7fb3357a1
> Author: John Baldwin <jhb@FreeBSD.org>
> Date:   Mon Apr 18 16:06:27 2022 -0700
> 
>      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
> 
> commit 615d289ffefe2b175f80caa9b1e113c975576472
> Author: John Baldwin <jhb@FreeBSD.org>
> Date:   Mon Apr 18 16:06:14 2022 -0700
> 
>      Re-enable set but not used warnings for kernel builds.
> 
>      make tinderbox now passes with this warning enabled as a fatal error,
>      so revert the change to hide it in preparation for making it fatal.
> 
>      This reverts commit e8e691983bb75e80153b802f47733f1531615fa2.
> 
>      Reviewed by:    imp, emaste
>      Differential Revision:  https://reviews.freebsd.org/D34948
> 
> 

 Ok I see,

 I won't have time until monday (maybe tuesday to fix this) but if
someone wants to beat me to it we should add some new CWARNFLAGS for
each problematic files in the 5.4-lts and 5.7-table branches of
drm-kmod (master which is following 5.10 is already good) only
if $ {COMPILER_VERSION} >= 130000.

 Cheers,

-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220421154555.8a69a542d97d6cf36472b75f>