Skip to content

Commit 90d30cc

Browse files
committed
8209380: ARM: cleanup maybe-uninitialized and reorder compiler warnings
Backport-of: 1712e27
1 parent 9d521b1 commit 90d30cc

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

src/hotspot/cpu/arm/assembler_arm_32.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ class Assembler : public AbstractAssembler {
10831083
break;
10841084
default:
10851085
ShouldNotReachHere();
1086+
return;
10861087
}
10871088
emit_int32(0xf << 28 | 0x1 << 25 | 0x1 << 23 | 0x1 << 4 |
10881089
(imm8 >> 7) << 24 | ((imm8 & 0x70) >> 4) << 16 | (imm8 & 0xf) |
@@ -1113,6 +1114,7 @@ class Assembler : public AbstractAssembler {
11131114
break;
11141115
default:
11151116
ShouldNotReachHere();
1117+
return;
11161118
}
11171119
emit_int32(cond << 28 | 0x1D /* 0b11101 */ << 23 | 0xB /* 0b1011 */ << 8 | 0x1 << 4 |
11181120
quad << 21 | b << 22 | e << 5 | Rs->encoding() << 12 |
@@ -1143,6 +1145,7 @@ class Assembler : public AbstractAssembler {
11431145
break;
11441146
default:
11451147
ShouldNotReachHere();
1148+
return;
11461149
}
11471150
emit_int32(0xF /* 0b1111 */ << 28 | 0x3B /* 0b00111011 */ << 20 | 0x6 /* 0b110 */ << 9 |
11481151
quad << 6 | imm4 << 16 |

src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
5252

5353

5454
RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array)
55-
: _throw_index_out_of_bounds_exception(false), _index(index), _array(array) {
55+
: _index(index), _array(array), _throw_index_out_of_bounds_exception(false) {
5656
assert(info != NULL, "must have info");
5757
_info = new CodeEmitInfo(info);
5858
}
5959

6060
RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index)
61-
: _throw_index_out_of_bounds_exception(true), _index(index), _array(NULL) {
61+
: _index(index), _array(NULL), _throw_index_out_of_bounds_exception(true) {
6262
assert(info != NULL, "must have info");
6363
_info = new CodeEmitInfo(info);
6464
}

src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3097,7 +3097,7 @@ void LIR_Assembler::emit_assert(LIR_OpAssert* op) {
30973097

30983098
Label ok;
30993099
if (op->condition() != lir_cond_always) {
3100-
AsmCondition acond;
3100+
AsmCondition acond = al;
31013101
switch (op->condition()) {
31023102
case lir_cond_equal: acond = eq; break;
31033103
case lir_cond_notEqual: acond = ne; break;

src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
733733

734734
default:
735735
ShouldNotReachHere();
736+
return;
736737
}
737738
#else
738739
switch (x->op()) {
@@ -757,6 +758,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
757758
break;
758759
default:
759760
ShouldNotReachHere();
761+
return;
760762
}
761763
LIR_Opr result = call_runtime(x->y(), x->x(), entry, x->type(), NULL);
762764
set_result(x, result);
@@ -824,7 +826,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
824826
if (x->op() == Bytecodes::_irem) {
825827
out_reg = FrameMap::R0_opr;
826828
__ irem(left_arg->result(), right_arg->result(), out_reg, tmp, info);
827-
} else if (x->op() == Bytecodes::_idiv) {
829+
} else { // (x->op() == Bytecodes::_idiv)
828830
out_reg = FrameMap::R1_opr;
829831
__ idiv(left_arg->result(), right_arg->result(), out_reg, tmp, info);
830832
}

0 commit comments

Comments
 (0)