RFR: 8036675 Compiler warnings in serviceability code
Staffan Larsen
staffan.larsen at oracle.com
Wed Mar 5 12:14:56 UTC 2014
This change addresses two compiler warnings in serviceability code.
/home/staffan/mercurial/jdk9-dev/jdk/src/share/native/sun/tracing/dtrace/JVM.c:292:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len >= sizeof(buf)) {
In this case I added a cast from size_t to jsize.
/home/staffan/mercurial/jdk9-dev/jdk/src/share/demo/jvmti/hprof/hprof_init.c:244:5: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (port == 0 || port > 65535) {
In this case I keep the port number as an int until after the validation is done.
Thanks,
/Staffan
bug: https://bugs.openjdk.java.net/browse/JDK-8036675
webrev: http://cr.openjdk.java.net/~sla/8036675/webrev.00/
More information about the serviceability-dev
mailing list