Maximum number of warnings allowed?
david.holmes at oracle.com
Wed Sep 13 12:24:51 UTC 2017
On 13/09/2017 9:48 PM, Maurizio Cimadamore wrote:
> Hi David,
> -Xmaxwarns controls how many warnings can be emitted - the default is
> 100, which means after 100 warnings the warning output will be omitted.
> There are similar options to limit errors and notes.
> That said, changing these limits does not affect the 'treat the warning
> as errors' policy - which is controlled by a separate flag, namely -Werror.
> In 'make/common/SetupJavaCmpilers.gmk' there are these lines:
> # If warnings needs to be non-fatal for testing purposes use a command
> # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
> JAVAC_WARNINGS := -Xlint:all -Werror
> So, the Werror flag doesn't seem controlled by the configuration-wide
> 'disable-warnings-as-errors' - which means you probably have to edit
> that makefile and remove the Werror flag.
Yeah just found that too :) At least I can now do "make images
JAVAC_WARNINGS="-Xlint:all" to kill the -Werror.
> On 13/09/17 11:30, David Holmes wrote:
>> On 13/09/2017 7:33 PM, David Holmes wrote:
>>> I'm building with --disable-warnings-as-errors but the build still
>>> 1 error
>>> 100 warnings
>>> CompileJavaModules.gmk:623: recipe for target
>>> make: ***
>>> Error 1
>>> make/Main.gmk:198: recipe for target 'java.datatransfer-java' failed
>>> make: *** [java.datatransfer-java] Error 1
>>> Is there a maximum number of warnings allowed before it's considered
>>> an error? Could this be coming from (s)javac? (The warnings are Java
>> I was told about -Xmaxwarns for javac and I bumped it to 1000 but it
>> didn't help much:
>> 1 error
>> 138 warnings
>> I finally spotted this in the log:
>> error: warnings found and -Werror specified
>> From the make-support/failure-log I see -Werror in the javac command
>> line. Obviously it isn't adhering to --disable-warnings-as-errors! :(
More information about the build-dev