<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">Could you please review following fix which fix code so gcc doesn't complain when JDK is build with enabled native code coverage.</div><div class=""><br class=""></div><div class="">webrev: <a href="http://cr.openjdk.java.net/~lmesnik/8209520/webrev.00/" class="">http://cr.openjdk.java.net/~lmesnik/8209520/webrev.00/</a></div><div class="">bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8209520" class="">https://bugs.openjdk.java.net/browse/JDK-8209520</a></div><div class=""><br class=""></div><div class=""><div class="">These warning appeared because of change optimization settings used for getting code coverage. </div></div><div class=""><br class=""></div><div class="">1) src/hotspot/cpu/x86/macroAssembler_x86.cpp, src/hotspot/share/gc/shared/genCollectedHeap.cpp</div><div class=""><br class=""></div><div class=""><div class="">gcc complained about uninitialized variables, like</div></div><div class=""><div class="">* For target hotspot_variant-server_libjvm_objs_macroAssembler_x86.o:</div><div class="">/home/lmesnik/ws/jdk-8209520/open/src/hotspot/cpu/x86/macroAssembler_x86.cpp: In member function 'void ControlWord::print() const':</div><div 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]</div><div class="">     printf("%04x  masks = %s, %s, %s", _value & 0xFFFF, f, rc, pc);</div><div class="">     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div 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]</div><div class=""><br class=""></div></div><div class="">So I just fixed codepath to show more explicitly that variables are initialized before usage. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">2) src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:</div><div class="">The changes to prevent waning about clobbering in splashscreen_png.c are similar to fix in:</div><div class=""><ol class="aui-nav aui-nav-breadcrumbs" resolved="" style="margin: 0px; list-style: none; padding: 0px;"><li style="list-style: none; margin: 0px; padding: 0px 10px; float: none; position: relative; display: inline;" class=""><a class="issue-link" data-issue-key="JDK-8080695" href="https://bugs.openjdk.java.net/browse/JDK-8080695" id="key-val" rel="4780255" style="color: rgb(59, 115, 175); text-decoration: none; cursor: pointer;">JDK-8080695</a></li><span style="font-family: Arial, sans-serif; orphans: 2; widows: 2; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class="">splashscreen_png.c compile error with gcc 4.9.2</span></ol><div class=""><br class=""></div></div><div class=""><br class=""></div><div 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.</div><div class="">Leonid</div></body></html>