diff --git a/Code/FeatureExtraction/otbFineCorrelationImageFilter.h b/Code/FeatureExtraction/otbFineCorrelationImageFilter.h
index 6b6a2e29f8575179726f992ae712aedc52330249..1343192d78ea4daf582ebbfb6d46472632e1db2a 100644
--- a/Code/FeatureExtraction/otbFineCorrelationImageFilter.h
+++ b/Code/FeatureExtraction/otbFineCorrelationImageFilter.h
@@ -172,7 +172,7 @@ private:
   void operator=(const Self&); //purposely not implemented
 
  /** Compute correlation from offset */
-  inline double Correlation(const NeighborhoodType & fixed, const NeighborhoodType & moving, const OffsetType & offset, unsigned int scale) const;
+  inline double Correlation(const NeighborhoodType & fixed, const NeighborhoodType & moving, const OffsetType & offset, unsigned int scale=1) const;
 
   /** Refine the location of the correlation maximum */
   inline double RefineLocation(const NeighborhoodType & correlMap,const OffsetType & maxPos, DeformationValueType & value) const;
diff --git a/Code/FeatureExtraction/otbFineCorrelationImageFilter.txx b/Code/FeatureExtraction/otbFineCorrelationImageFilter.txx
index 80b2a9feea6cbcbfb01b1f71776b214643a2ac73..8877166b4e74465ffa50e9d300c7b607ed561a25 100644
--- a/Code/FeatureExtraction/otbFineCorrelationImageFilter.txx
+++ b/Code/FeatureExtraction/otbFineCorrelationImageFilter.txx
@@ -25,6 +25,7 @@
 #include "itkProgressReporter.h"
 #include "itkLinearInterpolateImageFunction.h"
 #include "itkImageRegionIteratorWithIndex.h"
+#include <algorithm>
 
 namespace otb
 {
@@ -188,7 +189,7 @@ FineCorrelationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFiel
 template <class TInputImage, class TOutputCorrelation, class TOutputDeformationField>
 inline double
 FineCorrelationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationField>
-::Correlation(const NeighborhoodType & fixed, const NeighborhoodType & moving, const OffsetType & offset, unsigned int scale = 1) const
+::Correlation(const NeighborhoodType & fixed, const NeighborhoodType & moving, const OffsetType & offset, unsigned int scale) const
 {
   double crossProductSum = 0;
   double fSquareSum = 0;
@@ -341,7 +342,7 @@ FineCorrelationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFiel
       {
       invert = mat.GetInverse();
       }
-    catch( itk::ExceptionObject & err )
+    catch( itk::ExceptionObject & )
       {
       // Matrix is not invertible
       value[0]=maxPos[0];