Page MenuHomeFreeBSD

ath: fix older clang build.
ClosedPublic

Authored by imp on Mar 2 2022, 4:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 2:22 AM
Unknown Object (File)
Mon, Nov 25, 10:50 PM
Unknown Object (File)
Oct 1 2024, 4:45 AM
Unknown Object (File)
Sep 24 2024, 9:30 AM
Unknown Object (File)
Sep 24 2024, 8:55 AM
Unknown Object (File)
Sep 23 2024, 12:30 PM
Unknown Object (File)
Sep 11 2024, 3:00 PM
Unknown Object (File)
Sep 1 2024, 6:44 AM
Subscribers
None

Details

Summary

Define NO_WUNUSED_BUT_SET_VARIABLE for clang, and use it in ATH_C to
account for different clang versions.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Mar 2 2022, 4:09 AM
imp created this revision.

This looks correct by my eyeball, thanks!

sys/conf/kern.mk
96

Style bit: no space before = on both of these

This revision is now accepted and ready to land.Mar 2 2022, 4:12 AM

The tithe isn’t quite right. This is more about fixing the build with older versions of clang, not GCC. I don’t know if we have a similar helper variable in the userland side (bad.sys.mk?). If so we should define the helper there as well.

sys/conf/kern.mk
95

I don’t think you need the else since the variable defaults to empty already?

sys/conf/kern.mk
96

done, and fixed where I copied it from...

s/tithe/title/ (hate phone keyboards)

It occurs to me that modules/ath/Makefile should also use it, since that's likely the next failure

In D34408#779492, @jhb wrote:

The title isn’t quite right. This is more about fixing the build with older versions of clang, not GCC. I don’t know if we have a similar helper variable in the userland side (bsd.sys.mk?). If so we should define the helper there as well.

Fixed title. We just turn off errors for this in bsd.sys.mk, so no changes are needed.

imp retitled this revision from ath: fix gcc build. to ath: fix clang build..Mar 2 2022, 4:38 AM
imp retitled this revision from ath: fix clang build. to ath: fix older clang build..Mar 2 2022, 4:43 AM
This revision now requires review to proceed.Mar 2 2022, 4:44 AM
This revision is now accepted and ready to land.Mar 2 2022, 4:56 AM
This revision was automatically updated to reflect the committed changes.