Fold lim_shared into lim_copy to mute -Wunused compiler warnings from clang when
the kernel is compiled without INVARIANTS
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Why not inline the test into KASSERT() and get rid if lim_shared() ? It is not used otherwise and would save ten lines of code.
Comment Actions
Yeah, my gut said do that too, but I wasn't sure if mjg had used the function elsewhere.
I'll go ahead and do that.
sys/kern/kern_resource.c | ||
---|---|---|
1150 | Also, there is no need for #ifdef INVARIANTS around a single KASSERT(). That is redundant. |
sys/kern/kern_resource.c | ||
---|---|---|
1143 | I'll have to double check whether or not this would result in a compiler error because it couldn't look up the symbol for lim_shared. Both cases have been fixed by completely inlining lim_shared into lim_copy :). |