late to the party ...
If these generate new warnings has an issue been opened to address them?
Thanks,
David
On 19/12/2013 8:23 AM, Mike Duigou wrote:
In response to feedback from Dmitry and Christian I have updated the webrev:
http://cr.openjdk.java.net/~mduigou/JDK-8030350/1/webrev/
to now use the -Wformat=2 option and to also enable the option for BSD builds.
Thanks,
Mike
On Dec 17 2013, at 16:08 , Mike Duigou <mike.dui...@oracle.com> wrote:
Hello all;
This is a change which enables additional compiler warnings for native
compilation when using GCC. The (-Wformat -Wformat-security) options are
supported by GCC 3.0.4 (the earliest version I checked, c. February 2002) and
later so we shouldn't see issues with incompatibility.- Wextra appears to have
been added in GCC 3.4.X line (c. 2004) so it should also be reasonably well
adopted and replaces -W.
The core of the change is to add :
-Wextra -Wno-unused-parameter -Wformat -Wformat-security
for general C and CC++ compilations. For HotSpot C++ compiles a slightly less
aggressive set is used:
-Wformat -Wformat-security
is used.
Webrev here:
http://cr.openjdk.java.net/~mduigou/JDK-8030350/0/webrev/
For the curious, yes, the additional checks do generate additional warnings. ;-)
This change is targeted at the JDK 9 repos but could be backported to JDK 8
fairly easily/safely.
Mike