Commit 81b9c79a authored by Shucai Xiao's avatar Shucai Xiao
Browse files

fix cppcheck error

parent bac50c87
...@@ -2019,7 +2019,8 @@ TEST_CASE(op_capture) ...@@ -2019,7 +2019,8 @@ TEST_CASE(op_capture)
migraphx::program p; migraphx::program p;
migraphx::shape s1{migraphx::shape::float_type, {3, 3}}; migraphx::shape s1{migraphx::shape::float_type, {3, 3}};
migraphx::shape s2{migraphx::shape::float_type, {3, 6}}; migraphx::shape s2{migraphx::shape::float_type, {3, 6}};
std::vector<float> d1(s1.elements()), d2(s2.elements()); std::vector<float> d1(s1.elements());
std::vector<float> d2(s2.elements());
std::iota(d1.begin(), d1.end(), 0.0f); std::iota(d1.begin(), d1.end(), 0.0f);
std::iota(d2.begin(), d2.end(), 0.0f); std::iota(d2.begin(), d2.end(), 0.0f);
...@@ -2040,7 +2041,8 @@ TEST_CASE(op_capture) ...@@ -2040,7 +2041,8 @@ TEST_CASE(op_capture)
auto cap_res = capture_p.eval({}); auto cap_res = capture_p.eval({});
auto res = p.eval({}); auto res = p.eval({});
std::vector<float> vec, cap_vec; std::vector<float> vec;
std::vector<float> cap_vec;
cap_res.visit([&](auto output) { cap_vec.assign(output.begin(), output.end()); }); cap_res.visit([&](auto output) { cap_vec.assign(output.begin(), output.end()); });
res.visit([&](auto output) { vec.assign(output.begin(), output.end()); }); res.visit([&](auto output) { vec.assign(output.begin(), output.end()); });
......
...@@ -204,7 +204,7 @@ TEST_CASE(literal_add) ...@@ -204,7 +204,7 @@ TEST_CASE(literal_add)
TEST_CASE(op_capture) TEST_CASE(op_capture)
{ {
auto test_func = [&](std::size_t ins_index, std::vector<migraphx::argument> args) { auto test_func = [&](std::size_t ins_index, const std::vector<migraphx::argument>& args) {
(void)ins_index; (void)ins_index;
(void)args; (void)args;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment