diff --git a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx index 4a8be991ead904acf5d52bd69d3992e1ec4fa4d9..d94d39b311986a5f6703532cd10fef2ce44bce5a 100644 --- a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx +++ b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx @@ -76,7 +76,7 @@ SpectralAngleDistanceImageFilter<TInputImage,TOutputImage> double normProd1=0.0; double normProd2=0.0; InputPixelType pixel = inputIt.Get(); - for (int i=0; i<pixel.Size(); i++) + for (unsigned int i=0; i<pixel.Size(); i++) { scalarProd += pixel[i]*m_ReferencePixel[i]; normProd1 += pixel[i]*pixel[i]; diff --git a/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h b/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h index 74fd198c0f9b556433bcbedc26a58c9df7988af1..728fdc7050a44f893a86678ac355da96b62201b8 100644 --- a/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h +++ b/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h @@ -44,6 +44,7 @@ namespace Functor { if (itA.GetCenterPixel() != 0) { + TOutput resp = 0; typename TInput1::OffsetType offset1,offset2; int neighborhoodNumber; if (itB.GetCenterPixel() > 0) @@ -84,13 +85,10 @@ namespace Functor if ((itA.GetCenterPixel() > itA.GetPixel(offset1)) && (itA.GetCenterPixel() > itA.GetPixel(offset2))) { - return itA.GetCenterPixel(); - } - else - { - return 0; + resp = itA.GetCenterPixel(); } } + return resp; } }; } diff --git a/Code/IO/otbSpatialObjectDXFReader.txx b/Code/IO/otbSpatialObjectDXFReader.txx index 9af17b9d5a602592fe5606c74e4466e4c2c310ac..7ad35242f0d8453298a3897193ade0ce959ee1f3 100644 --- a/Code/IO/otbSpatialObjectDXFReader.txx +++ b/Code/IO/otbSpatialObjectDXFReader.txx @@ -112,7 +112,6 @@ SpatialObjectDXFReader<TSpatialObject> ::GenerateData() { TestFileExistanceAndReadability(); - GroupSpatialObjectType * ptr = this->GetOutput(); typedef otb::DXFToSpatialObjectGroupFilter<TSpatialObject> CreationFilter; typename CreationFilter::Pointer creationClass = CreationFilter::New(); if (m_LayerName.size()>0)