ART: Fix compiler warning at arm/int_arm.cc:644
Clang can report warning:
int_arm.cc:644:89: error: 'ops.art::ArmMir2Lir::EasyMultiplyOp::shift'
may be used uninitialized in this function
OpRegRegRegShift(kOpRsub, r_tmp1, r_src, r_src, EncodeShift(kArmLsl, ops[0].shift));
That warning becomes blocker for libart-compiler.so compilation.
This patch fixes the only case where 'shift' member was uninitialized.
Change-Id: I6428170994c9f97e7a3d85d752b97dfcdff0c8a4
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
diff --git a/compiler/dex/quick/arm/int_arm.cc b/compiler/dex/quick/arm/int_arm.cc
index 03e0e92..eb15611 100644
--- a/compiler/dex/quick/arm/int_arm.cc
+++ b/compiler/dex/quick/arm/int_arm.cc
@@ -573,6 +573,7 @@
// GenArithOpIntLit will directly generate exception-throwing code, and multiply-by-zero will
// have been optimized away earlier.
op->op = kOpInvalid;
+ op->shift = 0;
return true;
}