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)
Mon, Apr 1, 1:13 PM
Unknown Object (File)
Mar 21 2024, 11:09 PM
Unknown Object (File)
Feb 28 2024, 10:12 PM
Unknown Object (File)
Feb 21 2024, 2:05 PM
Unknown Object (File)
Feb 17 2024, 7:18 AM
Unknown Object (File)
Feb 8 2024, 7:39 AM
Unknown Object (File)
Feb 7 2024, 2:22 PM
Unknown Object (File)
Dec 26 2023, 7:39 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.