Skip to content

Commit a8924c4

Browse files
committed
Fixed compiler warnings due to potentially uninitialized variables.
1 parent 1a6de23 commit a8924c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/runtime/local/kernels/CastObjScaTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ TEMPLATE_TEST_CASE("castObjSca, matrix to scalar, single-element", TAG_KERNELS,
5252
TEMPLATE_TEST_CASE("castObjSca, matrix to scalar, non-single-element", TAG_KERNELS, double, int64_t, uint32_t) {
5353
using VT = TestType;
5454

55-
DenseMatrix<VT> *arg;
55+
DenseMatrix<VT> *arg = nullptr;
5656
SECTION("zero-element") { arg = DataObjectFactory::create<DenseMatrix<VT>>(0, 0, false); }
5757
SECTION("multi-element (nx1)") { arg = genGivenVals<DenseMatrix<VT>>(2, {VT(1), VT(2)}); }
5858
SECTION("multi-element (1xm)") { arg = genGivenVals<DenseMatrix<VT>>(1, {VT(1), VT(2)}); }
@@ -89,8 +89,8 @@ TEMPLATE_TEST_CASE("castObjSca, frame to scalar, single-element", TAG_KERNELS, d
8989
TEMPLATE_TEST_CASE("castObjSca, frame to scalar, non-single-element", TAG_KERNELS, double, int64_t, uint32_t) {
9090
using VT = TestType;
9191

92-
Frame *arg;
93-
DenseMatrix<VT> *argC0;
92+
Frame *arg = nullptr;
93+
DenseMatrix<VT> *argC0 = nullptr;
9494
SECTION("zero-element") {
9595
argC0 = DataObjectFactory::create<DenseMatrix<VT>>(0, 1, false);
9696
std::vector<Structure *> cols = {argC0};
@@ -114,4 +114,4 @@ TEMPLATE_TEST_CASE("castObjSca, frame to scalar, non-single-element", TAG_KERNEL
114114
VT res;
115115
CHECK_THROWS(res = castObjSca<VT, Frame>(arg, nullptr));
116116
DataObjectFactory::destroy(argC0, arg);
117-
}
117+
}

0 commit comments

Comments
 (0)