From 0149e69af2d8ed651e269352d31a00e1ae07595b Mon Sep 17 00:00:00 2001 From: Kent Gibson Date: Wed, 1 Jul 2020 09:39:08 +0800 Subject: [PATCH] bindings: cxx: fix sign-compare compile warnings in tests Fix sign-compare compile warnings in cxx tests. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski --- bindings/cxx/tests/tests-iter.cpp | 2 +- bindings/cxx/tests/tests-line.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/cxx/tests/tests-iter.cpp b/bindings/cxx/tests/tests-iter.cpp index fdc2cb5..4c07613 100644 --- a/bindings/cxx/tests/tests-iter.cpp +++ b/bindings/cxx/tests/tests-iter.cpp @@ -53,7 +53,7 @@ TEST_CASE("Line iterator works", "[iter][line]") { mockup::probe_guard mockup_chips({ 4 }); ::gpiod::chip chip(mockup::instance().chip_name(0)); - int count = 0; + unsigned int count = 0; for (auto& it: ::gpiod::line_iter(chip)) REQUIRE(it.offset() == count++); diff --git a/bindings/cxx/tests/tests-line.cpp b/bindings/cxx/tests/tests-line.cpp index 5353093..e2e4cbc 100644 --- a/bindings/cxx/tests/tests-line.cpp +++ b/bindings/cxx/tests/tests-line.cpp @@ -210,7 +210,7 @@ TEST_CASE("Line bulk object works correctly", "[line][bulk]") SECTION("bulk iterator works") { auto lines = chip.get_all_lines(); - int count = 0; + unsigned int count = 0; for (auto& it: lines) REQUIRE(it.offset() == count++); -- 2.30.2