Skip to contentSkip to conversation

Clang build fix for 7.1

GIT PULL Merged Nathan Chancellor 3 participants 4 messages Apr 24

lore
Share & tools
lore
#0 lore raw

Hi Linus,

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.

Cheers,
Nathan

The following changes since commit 028ef9c96e96197026887c0f092424679298aae8:

Linux 7.0 (2026-04-12 13:48:06 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git tags/clang-fixes-7.1-1

for you to fetch changes up to 4f96b7c68a9904e01049ef610d701b382dca9574:

extract-cert: Wrap key_pass with '#ifdef USE_PKCS11_ENGINE' (2026-04-16 14:21:10 -0700)

----------------------------------------------------------------
Clang build fixes for 7.1

- Wrap declaration and assignment of key_pass in certs/extract-cert.c with '#ifdef' that matches its only usage to clear up an instance of a new clang subwarning, -Wunused-but-set-global.

----------------------------------------------------------------
Nathan Chancellor (1):
extract-cert: Wrap key_pass with '#ifdef USE_PKCS11_ENGINE'

 certs/extract-cert.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
#1 lore raw
Quoted 5 lines · Nathan Chancellor

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.

Linus

#2 lore raw
Quoted 7 lines · Linus Torvalds
Quoted 5 lines · Nathan Chancellor

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.

Quoted 5 lines

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

merge bot Merged
#3 lore raw
In reply to Nathan Chancellor
The pull request you sent on Thu, 23 Apr 2026 17:04:13 -0700:

The pull request you sent on Thu, 23 Apr 2026 17:04:13 -0700:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/nathan/linux.git tags/clang-fixes-7.1-1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/bbc4af7ad94c452c00e64fc400fc1317351969b4

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html