diff --git a/hardware_interface/test/test_macros.cpp b/hardware_interface/test/test_macros.cpp index 18e9e292c0..c32497c6b1 100644 --- a/hardware_interface/test/test_macros.cpp +++ b/hardware_interface/test/test_macros.cpp @@ -62,7 +62,7 @@ TEST_F(TestMacros, throw_on_not_null) EXPECT_ANY_THROW(THROW_ON_NOT_NULLPTR(a_ptr)); std::vector vec_ptr; - for (auto i : {0, 1, 2}) + for (size_t i : {0, 1, 2}) { vec_ptr.push_back(i_ptr); EXPECT_ANY_THROW(THROW_ON_NOT_NULLPTR(vec_ptr[i]));