From 04628a9c183883b461114ff5b099943197431f5a Mon Sep 17 00:00:00 2001 From: Guillaume Pasero <guillaume.pasero@c-s.fr> Date: Thu, 19 Dec 2019 10:37:53 +0100 Subject: [PATCH] WRG: various warning fix --- include/otbSARDEMPolygonsAnalysisImageFilter.txx | 2 +- include/otbSARDEMProjectionImageFilter.h | 16 +++++++++++++++- include/otbSARDopplerCentroidFreqImageFilter.txx | 2 +- include/otbTilesAnalysisImageFilter.h | 11 ++++++----- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/include/otbSARDEMPolygonsAnalysisImageFilter.txx b/include/otbSARDEMPolygonsAnalysisImageFilter.txx index 38eeccb..ebdd171 100644 --- a/include/otbSARDEMPolygonsAnalysisImageFilter.txx +++ b/include/otbSARDEMPolygonsAnalysisImageFilter.txx @@ -909,7 +909,7 @@ namespace otb { OutIt.GoToBeginOfLine(); // indice of current line (into output Geometry) - int ind_Line = OutIt.GetIndex()[1] + int(this->GetOutput()->GetOrigin()[1]); + //~ int ind_Line = OutIt.GetIndex()[1] + int(this->GetOutput()->GetOrigin()[1]); // The Projeted DEM Pixel/Bands is always into SAR geometry => must be adapted for mlRan and mlAzi != 1 // If mlRan and mlAzi == 1 same as SAR geometry (loop on ind_Line_start=ind_Line only) diff --git a/include/otbSARDEMProjectionImageFilter.h b/include/otbSARDEMProjectionImageFilter.h index cd9f0f7..3bf4331 100644 --- a/include/otbSARDEMProjectionImageFilter.h +++ b/include/otbSARDEMProjectionImageFilter.h @@ -28,7 +28,21 @@ #include "otbSarSensorModelAdapter.h" #include "otbImageKeywordlist.h" -#include "ossim/base/ossimGeoidEgm96.h" +#if defined(__GNUC__) || defined(__clang__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Woverloaded-virtual" +#if defined(__GNUC__) && (__GNUC__ > 5) +#pragma GCC diagnostic ignored "-Wnonnull-compare" +#endif +# include "ossim/base/ossimGeoidEgm96.h" +# pragma GCC diagnostic pop +#else +# include "ossim/base/ossimGeoidEgm96.h" +#endif + + + + namespace otb { diff --git a/include/otbSARDopplerCentroidFreqImageFilter.txx b/include/otbSARDopplerCentroidFreqImageFilter.txx index 9a216cc..8d57b0d 100644 --- a/include/otbSARDopplerCentroidFreqImageFilter.txx +++ b/include/otbSARDopplerCentroidFreqImageFilter.txx @@ -154,7 +154,7 @@ namespace otb this->getAllCoefs(inputKWL, FMRateRecords); - DurationType diffAziTimeMin; + DurationType diffAziTimeMin(0); unsigned int polySelected = 0; // Select one polynomial (with m_MidAziTime) diff --git a/include/otbTilesAnalysisImageFilter.h b/include/otbTilesAnalysisImageFilter.h index 980412b..7301543 100644 --- a/include/otbTilesAnalysisImageFilter.h +++ b/include/otbTilesAnalysisImageFilter.h @@ -156,17 +156,17 @@ protected: TilesAnalysisImageFilter(); // Destructor - virtual ~TilesAnalysisImageFilter() ITK_OVERRIDE; + ~TilesAnalysisImageFilter() override; // Print - void PrintSelf(std::ostream & os, itk::Indent indent) const ITK_OVERRIDE; + void PrintSelf(std::ostream & os, itk::Indent indent) const override; /** TilesAnalysisImageFilter produces an image which are into output geometry. The differences between * output and input images can be the size of images and the dimensions. * As such, TilesAnalysisImageFilter needs to provide an implementation for * GenerateOutputInformation() in order to inform the pipeline execution model. */ - virtual void GenerateOutputInformation() ITK_OVERRIDE; + void GenerateOutputInformation() override; /** TilesAnalysisImageFilter needs a input requested region that corresponds to the margin and shifts * into the requested region of our output requested region. The output requested region needs to be modified @@ -174,7 +174,7 @@ protected: * As such, TilesAnalysesImageFilter needs to provide an implementation for * GenerateInputRequestedRegion() in order to inform the pipeline execution model. * \sa ProcessObject::GenerateInputRequestedRegion() */ - virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + void GenerateInputRequestedRegion() override; /** * OutputRegionToInputRegion returns the input region @@ -186,6 +186,7 @@ protected: */ GridRegionType OutputRegionToInputGridRegion(const ImageOutRegionType& outputRegion) const; + using Superclass::ThreadedGenerateData; /** startIndex and stopIndex represent the indices of tiles to process in thread threadId and index for the first tile */ void ThreadedGenerateData(unsigned int startTileId, unsigned int stopTileId, @@ -206,7 +207,7 @@ protected: /** * \sa ImageToImageFilter::ThreadedGenerateData(), * ImageToImageFilter::GenerateData() */ - virtual void GenerateData() ITK_OVERRIDE; + void GenerateData() override; private: TilesAnalysisImageFilter(const Self&); // purposely not implemented -- GitLab