diff --git a/src/libutil/position.cc b/src/libutil/position.cc index 3289dbe8b..5a2529262 100644 --- a/src/libutil/position.cc +++ b/src/libutil/position.cc @@ -119,12 +119,12 @@ std::optional Pos::getSnippetUpTo(const Pos & end) const { if (auto source = getSource()) { auto firstLine = LinesIterator(*source); - for (auto i = 1; i < this->line; ++i) { + for (uint32_t i = 1; i < this->line; ++i) { ++firstLine; } auto lastLine = LinesIterator(*source); - for (auto i = 1; i < end.line; ++i) { + for (uint32_t i = 1; i < end.line; ++i) { ++lastLine; }