RFR: 8228482: fix xlc16/xlclang comparison of distinct pointer types and string literal conversion warnings

Baesken, Matthias matthias.baesken at sap.com
Tue Jul 23 15:14:52 UTC 2019


Hello please review this patch .

It fixes a couple of  xlc16/xlclang warnings  , especially  comparison of distinct pointer types and string literal conversion warnings  .

When building with xlc16/xlclang, we still have a couple of warnings that have to be fixed :
warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
for example :
/nightly/jdk/src/hotspot/os/aix/libodm_aix.cpp:81:18: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
  odmWrapper odm("product", "/usr/lib/objrepos"); // could also use "lpp"
                 ^
/nightly/jdk/src/hotspot/os/aix/libodm_aix.cpp:81:29: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
  odmWrapper odm("product", "/usr/lib/objrepos"); // could also use "lpp"
                            ^

warning: comparison of distinct pointer types, for example :

/nightly/jdk/src/java.desktop/aix/native/libawt/porting_aix.c:50:14: warning: comparison of distinct pointer types ('void *' and 'char *') [-Wcompare-distinct-pointer-types]
        addr < (((char*)p->ldinfo_textorg) + p->ldinfo_textsize)) {
        ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Bug/webrev :


https://bugs.openjdk.java.net/browse/JDK-8228482

http://cr.openjdk.java.net/~mbaesken/webrevs/8228482.1/


Thanks, Matthias


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190723/7992b2af/attachment.html>


More information about the net-dev mailing list