[arrayfire] 135/248: Fix warnings

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.

commit ca1e922a36129c93b9b77361c705693b0d6c5fbe
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Mon Oct 19 16:01:51 2015 -0400

    Fix warnings
---
 src/backend/cpu/sift_nonfree.hpp | 6 +++---
 test/gloh_nonfree.cpp            | 1 -
 test/sift_nonfree.cpp            | 1 -
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/backend/cpu/sift_nonfree.hpp b/src/backend/cpu/sift_nonfree.hpp
index 72a2033..514a134 100644
--- a/src/backend/cpu/sift_nonfree.hpp
+++ b/src/backend/cpu/sift_nonfree.hpp
@@ -782,7 +782,7 @@ namespace cpu
 
             int len = radius*2+1;
 
-            for (int i = 0; i < desc_len; i++)
+            for (int i = 0; i < (int)desc_len; i++)
                 desc[i] = 0.f;
 
             // Calculate orientation histogram
@@ -852,13 +852,13 @@ namespace cpu
 
             normalizeDesc(desc, desc_len);
 
-            for (int i = 0; i < desc_len; i++)
+            for (int i = 0; i < (int)desc_len; i++)
                 desc[i] = min(desc[i], DescrMagThr);
 
             normalizeDesc(desc, desc_len);
 
             // Calculate final descriptor values
-            for (int k = 0; k < desc_len; k++) {
+            for (int k = 0; k < (int)desc_len; k++) {
                 desc_out[f*desc_len+k] = round(min(255.f, desc[k] * IntDescrFctr));
             }
         }
diff --git a/test/gloh_nonfree.cpp b/test/gloh_nonfree.cpp
index bdb810a..2346269 100644
--- a/test/gloh_nonfree.cpp
+++ b/test/gloh_nonfree.cpp
@@ -234,7 +234,6 @@ void glohTest(string pTestFile)
             ASSERT_LE(fabs(out_feat[elIter].f[4] - gold_feat[elIter].f[4]), 1e-3) << "at: " << elIter << std::endl;
         }
 
-        bool isTypeDouble = is_same_type<T, double>::value || is_same_type<T, af::cdouble>::value;
         EXPECT_TRUE(compareEuclidean(descDims[0], descDims[1], (float*)&v_out_desc[0], (float*)&v_gold_desc[0], 2.f, 5.5f));
 
         ASSERT_EQ(AF_SUCCESS, af_release_array(inArray));
diff --git a/test/sift_nonfree.cpp b/test/sift_nonfree.cpp
index 0d31eed..28c597c 100644
--- a/test/sift_nonfree.cpp
+++ b/test/sift_nonfree.cpp
@@ -234,7 +234,6 @@ void siftTest(string pTestFile, unsigned nLayers, float contrastThr, float edgeT
             ASSERT_LE(fabs(out_feat[elIter].f[4] - gold_feat[elIter].f[4]), 1e-3) << "at: " << elIter << std::endl;
         }
 
-        bool isTypeDouble = is_same_type<T, double>::value || is_same_type<T, af::cdouble>::value;
         EXPECT_TRUE(compareEuclidean(descDims[0], descDims[1], (float*)&v_out_desc[0], (float*)&v_gold_desc[0], 2.f, 4.5f));
 
         ASSERT_EQ(AF_SUCCESS, af_release_array(inArray));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list