INVARIANTS sometimes informally documents some of the less obvious
assumptions that trip up clang --analyze with a path into a __dead2
function. Turning it on doesn't affect much else, so let's do it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 42622 Build 39510: arc lint + arc unit
Event Timeline
Comment Actions
This is going to hide a host of write-only or straight up unused vars when the kernel is built without invariants.
If anything the thing to do here is to rework all the assert macros to expand to __builtin_unreachable if the asserted condition does not hold. However, that's quite a churn.
Comment Actions
[Phabricator is magic]. I don't see how you intend to do that, either, if the very act of observing the write-only var is enough to kill it.