Re: [GIT PULL] Clang build fix for 7.1

From: Nathan Chancellor

Date: Fri Apr 24 2026 - 13:18:08 EST


On Fri, Apr 24, 2026 at 09:33:19AM -0700, Linus Torvalds wrote:
> On Thu, 23 Apr 2026 at 17:04, Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
> >
> > Please pull this single build fix for an instance of a new clang
> > subwarning under -Wunused-but-set-variable, -Wunused-but-set-global,
> > that appears in certs/extract-cert.c. If there are any issues, please
> > let me know.
>
> Ugh. I've pulled this, but this is very ugly and does not make the
> source code better.
>
> So if these patterns keep happening, I think the whole warning should
> just be removed.

Ack. For the record, there were only three instances of this warning in
the host tools (-Wunused-but-set-variable is currently enabled at W=1
for the rest of the kernel so I have not audited those patterns) and of
those, this is the only one where I took the '#ifdef' approach. So I
don't expect this to keep happening but if it does, we can certainly
evaluate turning it off (although I expect new code will just avoid this
warning through the various build reports and such that happen during
development).

Thank you for pulling it despite the ugliness.

Cheers,
Nathan