From 5bfed760d5c294d4e0c5e478b6ea81f93df7fcb3 Mon Sep 17 00:00:00 2001
From: Otmane Lahlou <otmane.lahlou@c-s.fr>
Date: Mon, 2 Feb 2009 09:12:18 +0100
Subject: [PATCH] ENH: fixing warnings

---
 .../otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx  | 2 +-
 Code/FeatureExtraction/otbEntropyTextureFunctor.h         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx b/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx
index a9ee238bc6..e227556043 100644
--- a/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx
+++ b/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx
@@ -50,7 +50,7 @@ UnaryFunctorNeighborhoodWithOffsetImageFilter<TInputImage,TOutputImage,TFunction
 {
   Superclass::BeforeThreadedGenerateData();
 
-  for (unsigned int i =0; i<this->GetNumberOfThreads(); i++)
+  for (unsigned int i =0; i<static_cast<unsigned int>(this->GetNumberOfThreads()); i++)
   {
     m_FunctorList.push_back(m_Functor);
   }
diff --git a/Code/FeatureExtraction/otbEntropyTextureFunctor.h b/Code/FeatureExtraction/otbEntropyTextureFunctor.h
index 9c18e478a3..8c57376d9d 100644
--- a/Code/FeatureExtraction/otbEntropyTextureFunctor.h
+++ b/Code/FeatureExtraction/otbEntropyTextureFunctor.h
@@ -180,11 +180,11 @@ public:
       IntVectorType histoTemp;
       IntVectorVectorType histo;
       if (binsLength[0][i] != 0)
-        histoTemp = IntVectorType( vcl_floor((m_Maxi[i]-m_Mini[i])/binsLength[0][i])+1, 0 );
+        histoTemp = IntVectorType( vcl_floor( static_cast<double>(m_Maxi[i]-m_Mini[i])/binsLength[0][i])+1., 0);
       else
         histoTemp = IntVectorType( 1, 0 );
       if (binsLength[1][i] != 0)
-        histo = IntVectorVectorType( vcl_floor((m_MaxiOff[i]-m_MiniOff[i])/binsLength[1][i])+1, histoTemp );
+        histo = IntVectorVectorType( vcl_floor(static_cast<double>(m_MaxiOff[i]-m_MiniOff[i])/binsLength[1][i])+1., histoTemp );
       else
         histo = IntVectorVectorType( 1, histoTemp );
 
@@ -204,11 +204,11 @@ public:
           offsetOff[1]++;
           offset[1] = k;
           if ( binsLength[1][i] != 0)
-            histoIdX = vcl_floor( (itOff.GetPixel(offsetOff)[i]-m_MiniOff[i]) / binsLength[1][i] );
+            histoIdX = static_cast<int>(vcl_floor( (itOff.GetPixel(offsetOff)[i]-m_MiniOff[i]) / binsLength[1][i] ));
           else
             histoIdX = 0;
           if ( binsLength[0][i] !=0 )
-            histoIdY = vcl_floor( (it.GetPixel(offset)[i]-m_Mini[i]) / binsLength[0][i] );
+            histoIdY = static_cast<int>(vcl_floor( (it.GetPixel(offset)[i]-m_Mini[i]) / binsLength[0][i] ));
           else
             histoIdY = 0;
           histo[histoIdX][histoIdY]++;
-- 
GitLab