From c120001178ffa6220d5cd9b17f1f98b659798fb1 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 15 Jan 2015 17:17:35 +0300 Subject: [PATCH] fix -Wsign-compare warnings --- modules/features2d/src/kaze/AKAZEFeatures.cpp | 2 +- modules/imgcodecs/test/test_grfmt.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/features2d/src/kaze/AKAZEFeatures.cpp b/modules/features2d/src/kaze/AKAZEFeatures.cpp index 798858403..fd15345b2 100644 --- a/modules/features2d/src/kaze/AKAZEFeatures.cpp +++ b/modules/features2d/src/kaze/AKAZEFeatures.cpp @@ -818,7 +818,7 @@ void AKAZEFeatures::Compute_Main_Orientation(KeyPoint& kpt, const std::vector(float)(2.0*CV_PI) ? ang1 - (float)(5.0*CV_PI / 3.0) : ang1 + (float)(CV_PI / 3.0)); sumX = sumY = 0.f; - for (size_t k = 0; k < ang_size; ++k) { + for (int k = 0; k < ang_size; ++k) { // Get angle from the x-axis of the sample point const float & ang = Ang[k]; diff --git a/modules/imgcodecs/test/test_grfmt.cpp b/modules/imgcodecs/test/test_grfmt.cpp index d3f21f16b..d1610ae7f 100644 --- a/modules/imgcodecs/test/test_grfmt.cpp +++ b/modules/imgcodecs/test/test_grfmt.cpp @@ -664,7 +664,7 @@ private: vector pages; bool res = imreadmulti(folder + "multipage.tif", pages, flags); ASSERT_TRUE(res == true); - ASSERT_TRUE(pages.size() == page_count); + ASSERT_EQ(static_cast(page_count), pages.size()); for (int i = 0; i < page_count; i++) {