From aeb4d66f94930d10a3d651113348e2710b582574 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@c-s.fr> Date: Fri, 27 Apr 2007 06:51:12 +0000 Subject: [PATCH] Correction warnings debug - wall --- Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx | 2 +- .../FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h | 8 +++----- Code/IO/otbSpatialObjectDXFReader.txx | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx index 4a8be991ea..d94d39b311 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 74fd198c0f..728fdc7050 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 9af17b9d5a..7ad35242f0 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) -- GitLab