Hi, r261991 by dim@ added -Wno-unused-function to kernel compile flags via CWARNEXTRA. Also MFCd to 10-STABLE by r263763 and 9-STABLE by r263509 This looks wrong in context and from the preceding comment. I think the intent may have been to only *not fail* in case of the warning (-Wno-error-unused-function). But instead, this type of was disabled completely from being shown. I thought this ought to be double-checked (or otherwise fix the comment if it is intentional). Just in case one day, an unused function is introduced and nobody ever sees the warning... Thanks!!
The reason I added -Wno-unused-function is that I got sick of fixing unused function warnings all over the code so I could import a new version of clang. :) In any case, you are probably right that it is better to at least enable the warning message, in the (IMO rather vain) hope that somebody will eventually fix those warnings, either by marking the functions __unused, or by simply deleting them.
A commit references this bug: Author: dim Date: Wed Jul 16 20:37:04 UTC 2014 New revision: 268774 URL: http://svnweb.freebsd.org/changeset/base/268774 Log: After r261991, clang warnings about unused functions in the kernel were completely silenced. Make sure these warnings appear again, so there is some incentive to fix them, but do not error out the whole kernel build for them. Noticed by: steven@pyro.eu.org PR: 191867 MFC after: 3 days Changes: head/sys/conf/kern.mk
Fix committed in r268774, now waiting for the MFC timeout (3 days).
Thanks for this! Here's to hoping some people will see the warnings, and clean up from time to time.
A commit references this bug: Author: dim Date: Sat Jul 19 18:33:09 UTC 2014 New revision: 268882 URL: http://svnweb.freebsd.org/changeset/base/268882 Log: MFC r268774: After r261991, clang warnings about unused functions in the kernel were completely silenced. Make sure these warnings appear again, so there is some incentive to fix them, but do not error out the whole kernel build for them. Noticed by: steven@pyro.eu.org PR: 191867 Changes: _U stable/10/ stable/10/sys/conf/kern.mk _U stable/9/sys/ stable/9/sys/conf/kern.mk
Fix merged to stable/10 and stable/9 in r268882.