Build kernel modules with -Wno-unused-but-set-variable by default. This
can be turned back on by specifying WITH_SET_NOTUSED_MODULE_WARNINGS= in
src.conf.
with this patch, on a GENERIC amd64 kernel build:
% make cleankernel && make buildkernel -j8 | grep "set but not used" | wc -l
119
And after setting WITH_SET_NOTUSED_MODULE_WARNINGS= in src.conf:
% make cleankernel && make buildkernel -j8 | grep "set but not used" | wc -l
403
The motive for this proposal is to help focus efforts on the reduced set
of warnings.