mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-04 18:55:22 +00:00
8309692: Fix -Wconversion warnings in javaClasses
Reviewed-by: fparain, matsaave
This commit is contained in:
parent
7d82479096
commit
beec734fdd
@ -817,16 +817,16 @@ static void initialize_static_primitive_field(fieldDescriptor* fd, Handle mirror
|
||||
BasicType t = fd->field_type();
|
||||
switch (t) {
|
||||
case T_BYTE:
|
||||
mirror()->byte_field_put(fd->offset(), fd->int_initial_value());
|
||||
mirror()->byte_field_put(fd->offset(), checked_cast<jbyte>(fd->int_initial_value()));
|
||||
break;
|
||||
case T_BOOLEAN:
|
||||
mirror()->bool_field_put(fd->offset(), fd->int_initial_value());
|
||||
mirror()->bool_field_put(fd->offset(), checked_cast<jboolean>(fd->int_initial_value()));
|
||||
break;
|
||||
case T_CHAR:
|
||||
mirror()->char_field_put(fd->offset(), fd->int_initial_value());
|
||||
mirror()->char_field_put(fd->offset(), checked_cast<jchar>(fd->int_initial_value()));
|
||||
break;
|
||||
case T_SHORT:
|
||||
mirror()->short_field_put(fd->offset(), fd->int_initial_value());
|
||||
mirror()->short_field_put(fd->offset(), checked_cast<jshort>(fd->int_initial_value()));
|
||||
break;
|
||||
case T_INT:
|
||||
mirror()->int_field_put(fd->offset(), fd->int_initial_value());
|
||||
|
||||
@ -325,15 +325,15 @@ inline bool java_lang_Module::is_instance(oop obj) {
|
||||
inline int Backtrace::merge_bci_and_version(int bci, int version) {
|
||||
// only store u2 for version, checking for overflow.
|
||||
if (version > USHRT_MAX || version < 0) version = USHRT_MAX;
|
||||
assert((jushort)bci == bci, "bci should be short");
|
||||
return build_int_from_shorts(version, bci);
|
||||
assert((u2)bci == bci, "bci should be short");
|
||||
return build_int_from_shorts((u2)version, (u2)bci);
|
||||
}
|
||||
|
||||
inline int Backtrace::merge_mid_and_cpref(int mid, int cpref) {
|
||||
// only store u2 for mid and cpref, checking for overflow.
|
||||
assert((jushort)mid == mid, "mid should be short");
|
||||
assert((jushort)cpref == cpref, "cpref should be short");
|
||||
return build_int_from_shorts(cpref, mid);
|
||||
assert((u2)mid == mid, "mid should be short");
|
||||
assert((u2)cpref == cpref, "cpref should be short");
|
||||
return build_int_from_shorts((u2)cpref, (u2)mid);
|
||||
}
|
||||
|
||||
inline int Backtrace::bci_at(unsigned int merged) {
|
||||
|
||||
@ -1274,7 +1274,7 @@ const int ObjectAlignmentInBytes = 8;
|
||||
"(0.0 means off)") \
|
||||
range(0.0, (double)max_intx) \
|
||||
\
|
||||
product(intx, MaxJavaStackTraceDepth, 1024, \
|
||||
product(int, MaxJavaStackTraceDepth, 1024, \
|
||||
"The maximum number of lines in the stack trace for Java " \
|
||||
"exceptions (0 means all)") \
|
||||
range(0, max_jint/2) \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user