Skip to content

Commit

Permalink
Merge pull request NixOS#11114 from DeterminateSystems/fix-warning
Browse files Browse the repository at this point in the history
Pos::getSnippetUpTo(): Fix warning
  • Loading branch information
edolstra committed Jul 16, 2024
2 parents 9c6678d + 3d8fa9f commit 9300f85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libutil/position.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ std::optional<std::string> 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;
}

Expand Down

0 comments on commit 9300f85

Please sign in to comment.