diff --git a/Code/Hyperspectral/otbLocalRxDetectorFilter.txx b/Code/Hyperspectral/otbLocalRxDetectorFilter.txx
index 4d726fa9c66fe2644ba4a94ed1af97c6fca8e5df..104f625a0702bbc6246371d697ac4b599c293ca1 100644
--- a/Code/Hyperspectral/otbLocalRxDetectorFilter.txx
+++ b/Code/Hyperspectral/otbLocalRxDetectorFilter.txx
@@ -126,16 +126,12 @@ LocalRxDetectorFilter<TInputImage, TOutputImage>
   ImageRegionIteratorType outputIt(outputPtr, *fit);
 
   // Run Input Image
-  int j = 0;
-
   for (inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd(); ++inputIt, ++outputIt)
     {
-
     // Create ListSample
     typename ListSampleType::Pointer listSample = ListSampleType::New();
     listSample->SetMeasurementVectorSize(inputPtr->GetNumberOfComponentsPerPixel());
 
-
     // Run neighborhood
     typename ConstShapedNeighborhoodIteratorType::ConstIterator ci;
     for (ci = inputIt.Begin(); !ci.IsAtEnd(); ++ci)
@@ -144,7 +140,6 @@ LocalRxDetectorFilter<TInputImage, TOutputImage>
       listSample->PushBack(ci.Get());
       }
 
-
     // Compute Mean vector
     typename MeanCalculatorType::Pointer meanCalculator = MeanCalculatorType::New();
     meanCalculator->SetInputSample(listSample);
@@ -153,7 +148,6 @@ LocalRxDetectorFilter<TInputImage, TOutputImage>
     typename MeanCalculatorType::OutputType *meanVector;
     meanVector = meanCalculator->GetOutput();
 
-
     // Compute covariance matrix
     typename CovarianceCalculatorType::Pointer covarianceCalculator = CovarianceCalculatorType::New();
     covarianceCalculator->SetInputSample(listSample);
@@ -162,7 +156,6 @@ LocalRxDetectorFilter<TInputImage, TOutputImage>
 
     const typename CovarianceCalculatorType::OutputType *covarianceMatrix = covarianceCalculator->GetOutput();
 
-
     // Compute RX value
     MatrixType invCovMat;
     invCovMat = covarianceMatrix->GetInverse();
diff --git a/Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx b/Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
index 50bd43b675932cb5b7dfc219839e07b9c9aee662..719e33826844945f77565d3c003691c82d4cd3f4 100644
--- a/Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
+++ b/Code/Hyperspectral/otbNCLSUnmixingImageFilter.txx
@@ -102,7 +102,6 @@ NCLSUnmixingFunctor<TInput, TOutput, TPrecision>
   VectorType uclsVector = m_Svd->solve(inVector);
 
   unsigned int nbEndmembers = m_OutputSize;
-  unsigned int nbBands = in.Size();
 
   // Apply NCLS iterations
   VectorType lambda(nbEndmembers);