Fix CalculateBroadcastedShapeTest#Basic.
CalculateBroadcastedShapeTest#Basic is failing on ToT because the shapes
are created uninitialized.
This CL gives each field a default value.
Fixes: 146654687
Test: NeuralNetworksTest_utils
Test: NNT_static
Change-Id: I29fef7e96660e361c26cab81e1c83cb9ed4928de
diff --git a/common/include/OperationsUtils.h b/common/include/OperationsUtils.h
index a924311..d6785f4 100644
--- a/common/include/OperationsUtils.h
+++ b/common/include/OperationsUtils.h
@@ -45,10 +45,10 @@
// Stores operand type information. "Shape" is a historical name.
struct Shape {
- hal::OperandType type;
+ hal::OperandType type = hal::OperandType::FLOAT32;
std::vector<uint32_t> dimensions;
- float scale;
- int32_t offset;
+ float scale = 0.0f;
+ int32_t offset = 0;
hal::Operand::ExtraParams extraParams;
};