<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">Thanks for background. Assuming these or similar issues were already discussed and it was decided to ignore warnings for code coverage builds I think it is fine to fix build. Current warnings don't look as real issues for me also. </div><div class=""><br class=""></div><div class="">I moved components alias as bcc since now it is build-only changes. </div><div class=""><br class=""></div><div class="">The build is fixed to don't treat warnings as errors by default when code coverage is enabled.</div><div class=""><br class=""></div><div class="">new webrev: <a href="http://cr.openjdk.java.net/~lmesnik/8209520/webrev.01/" class="">http://cr.openjdk.java.net/~lmesnik/8209520/webrev.01/</a></div><div class=""><div class=""><div><br class=""></div><div><br class=""></div><div>Leonid</div><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 23, 2018, at 3:44 PM, Igor Ignatev <<a href="mailto:igor.ignatyev@oracle.com" class="">igor.ignatyev@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Leonid,<br class=""><br class="">We have never supported native code coverage builds with warnings enabled as errors. There are bugs in gcc which cause false positive warnings, so it was decided to ignore all warnings from instrumented builds. It’d be much better and reliable to fix makefiles to always use ‘disable-warning-as-errors’ when ‘enable-native-coverage’ is used. It should be pretty straightforward to do.<br class=""><br class="">cc’ing build alias.  <br class=""><br class="">Cheers,<br class="">— Igor<br class=""><br class=""><blockquote type="cite" class="">On Aug 23, 2018, at 2:37 PM, Vladimir Kozlov <<a href="mailto:vladimir.kozlov@oracle.com" class="">vladimir.kozlov@oracle.com</a>> wrote:<br class=""><br class="">macroassembler changes are good.<br class=""><br class="">Thanks,<br class="">Vladimir<br class=""><br class=""><blockquote type="cite" class="">On 8/23/18 1:51 PM, Leonid Mesnik wrote:<br class="">Hi<br class="">Could you please review following fix which fix code so gcc doesn't complain when JDK is build with enabled native code coverage.<br class="">webrev: <a href="http://cr.openjdk.java.net/~lmesnik/8209520/webrev.00/" class="">http://cr.openjdk.java.net/~lmesnik/8209520/webrev.00/</a> <<a href="http://cr.openjdk.java.net/%7Elmesnik/8209520/webrev.00/" class="">http://cr.openjdk.java.net/%7Elmesnik/8209520/webrev.00/</a>><br class="">bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8209520" class="">https://bugs.openjdk.java.net/browse/JDK-8209520</a><br class="">These warning appeared because of change optimization settings used for getting code coverage.<br class="">1) src/hotspot/cpu/x86/macroAssembler_x86.cpp, src/hotspot/share/gc/shared/genCollectedHeap.cpp<br class="">gcc complained about uninitialized variables, like<br class="">* For target hotspot_variant-server_libjvm_objs_macroAssembler_x86.o:<br class="">/home/lmesnik/ws/jdk-8209520/open/src/hotspot/cpu/x86/macroAssembler_x86.cpp: In member function 'void ControlWord::print() const':<br class="">/home/lmesnik/ws/jdk-8209520/open/src/hotspot/cpu/x86/macroAssembler_x86.cpp:5769:11: error: 'pc' may be used uninitialized in this function [-Werror=maybe-uninitialized]<br class="">     printf("%04x  masks = %s, %s, %s", _value & 0xFFFF, f, rc, pc);<br class="">     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">/home/lmesnik/ws/jdk-8209520/open/src/hotspot/cpu/x86/macroAssembler_x86.cpp:5769:11: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]<br class="">So I just fixed codepath to show more explicitly that variables are initialized before usage.<br class="">2) src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:<br class="">The changes to prevent waning about clobbering in splashscreen_png.c are similar to fix in:<br class="">1. JDK-8080695 <<a href="https://bugs.openjdk.java.net/browse/JDK-8080695" class="">https://bugs.openjdk.java.net/browse/JDK-8080695</a>><br class="">   splashscreen_png.c compile error with gcc 4.9.2<br class="">The another approach would be to fix build to ignore these warnings for code coverage build. While I think it makes build system even more complicated.<br class="">Leonid<br class=""></blockquote></blockquote><br class=""></div></div></blockquote></div><br class=""></div></div></div></body></html>