Page MenuHomeFreeBSD

Add -Wno-error=unused-but-set-variable when building with Clang 13+
ClosedPublic

Authored by dim on Sep 13 2021, 12:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 3:53 PM
Unknown Object (File)
Thu, Oct 17, 8:00 PM
Unknown Object (File)
Tue, Oct 15, 2:52 AM
Unknown Object (File)
Oct 2 2024, 11:59 PM
Unknown Object (File)
Sep 28 2024, 10:10 PM
Unknown Object (File)
Sep 5 2024, 10:05 AM
Unknown Object (File)
Sep 4 2024, 11:34 AM
Unknown Object (File)
Aug 28 2024, 8:35 PM
Subscribers

Details

Summary

This warning triggers many times while building world. Downgrade it to
a warning until all occurrences have been fixed. Once the Clang warnings
have been fixed we should be able to turn it on for GCC as well.
See also f4fed768bba45a406f73ed1491d7e52fd1a8711d which did the same for
the kernel builds.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41477
Build 38366: arc lint + arc unit

Event Timeline

This change was sufficient to build and test amd64 with LLVM HEAD as of today.

I did this slightly differently in https://github.com/DimitryAndric/freebsd-src/commit/73a8f96dc7c12ebf76f5a40a7f1208c11f75741f, and I put it in another if block. It would be nice to choose either my version or yours, and integrate it right away, so I don't get needless merge conflicts the next time I sync up the llvm-13-update branch with main.

In D31927#720365, @dim wrote:

I did this slightly differently in https://github.com/DimitryAndric/freebsd-src/commit/73a8f96dc7c12ebf76f5a40a7f1208c11f75741f, and I put it in another if block. It would be nice to choose either my version or yours, and integrate it right away, so I don't get needless merge conflicts the next time I sync up the llvm-13-update branch with main.

Making it an error for WARNS=6 seems reasonable. Happy to just use you version instead.

Either one is fine with me, and agree we should get it in HEAD immediately, independent of the merge of Clang 13.

This revision is now accepted and ready to land.Sep 13 2021, 2:28 PM

Also happy with dim's version...

dim edited reviewers, added: arichardson; removed: dim.