Commit e472b712 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

Merge branch 'wrg_cleaning' into 'develop'

Warning cleaning

See merge request !653
parents f365b62b 57d3ae07
Pipeline #3294 passed with stages
in 84 minutes and 24 seconds
......@@ -10,6 +10,8 @@ Aurélie Emilien <aurelie.emilien@c-s.fr>
Aurélie Emilien <aurelie.emilien@c-s.fr> Aurelie Emilien <aurelie.emilien@c-s.fr>
Bas Couwenberg <sebastic@debian.org>
Bas Couwenberg <sebastic@debian.org> Bas Couwenberg <sebastic@xs4all.nl>
Carole Amiot <carole.amiot@cnes.fr>
Carole Amiot <carole.amiot@cnes.fr> Carole Amiot <carole.amiot@thales-services.fr>
Caroline Ruffel <caroline.ruffel@c-s.fr>
Charles Peyrega <charles.peyrega@c-s.fr>
Chia Aik Song <crscas@nus.edu.sg>
......
......@@ -32,6 +32,10 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Waddress"
#if defined(__GNUC__) && (__GNUC__ > 5)
#pragma GCC diagnostic ignored "-Wnonnull-compare"
#endif
#include "ossim/base/ossimKeywordlist.h"
#include "ossim/base/ossimString.h"
#include "ossim/ossimPluginProjectionFactory.h"
......
......@@ -30,6 +30,10 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Waddress"
#if defined(__GNUC__) && (__GNUC__ > 5)
#pragma GCC diagnostic ignored "-Wnonnull-compare"
#endif
#include "ossim/projection/ossimRpcSolver.h"
#include "ossim/projection/ossimProjection.h"
#include "ossim/projection/ossimRpcProjection.h"
......
......@@ -31,6 +31,10 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Waddress"
#if defined(__GNUC__) && (__GNUC__ > 5)
#pragma GCC diagnostic ignored "-Wnonnull-compare"
#endif
#include "ossim/ossimSarSensorModel.h"
#include "ossim/ossimPluginProjectionFactory.h"
#pragma GCC diagnostic pop
......
......@@ -31,6 +31,10 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Waddress"
#if defined(__GNUC__) && (__GNUC__ > 5)
#pragma GCC diagnostic ignored "-Wnonnull-compare"
#endif
#include "ossim/projection/ossimProjection.h"
#include "ossim/projection/ossimSensorModelFactory.h"
#include "ossim/projection/ossimSensorModel.h"
......
......@@ -109,7 +109,7 @@ private:
ogr::DataSource::Pointer buffer);
/** Create the output DataSource. */
otb::ogr::DataSource::Pointer CreateOutputDataSource(ogr::DataSource::Pointer source, ogr::Layer& layer);
otb::ogr::DataSource::Pointer CreateOutputDataSource(ogr::Layer& layer);
/** Add a prediction field in the output layer if it does not exist.
* If computeConfidenceMap evaluates to true a confidence field will be
......
......@@ -164,7 +164,7 @@ otb::ogr::DataSource::Pointer VectorPrediction<RegressionMode>::ReopenDataSource
}
template <bool RegressionMode>
otb::ogr::DataSource::Pointer VectorPrediction<RegressionMode>::CreateOutputDataSource(ogr::DataSource::Pointer source, ogr::Layer& layer)
otb::ogr::DataSource::Pointer VectorPrediction<RegressionMode>::CreateOutputDataSource(ogr::Layer& layer)
{
ogr::DataSource::Pointer output;
// Create new OGRDataSource
......@@ -316,7 +316,7 @@ void VectorPrediction<RegressionMode>::DoExecute()
}
else
{
output = CreateOutputDataSource(source, layer);
output = CreateOutputDataSource(layer);
}
otb::ogr::Layer outLayer = output->GetLayer(0);
......
......@@ -206,7 +206,7 @@ private:
return outputFile;
}
void DoInit()
void DoInit() override
{
SetName("Mosaic");
SetDescription("Perform a mosaic of input images");
......@@ -382,7 +382,7 @@ private:
SetDocExampleParameterValue("out", "mosaicImage.tif");
}
void DoUpdateParameters()
void DoUpdateParameters() override
{
// TODO: update parameters
}
......@@ -1028,7 +1028,7 @@ private:
}
}
void DoExecute()
void DoExecute() override
{
GDALAllRegister();
m_TemporaryFiles.clear();
......@@ -1055,7 +1055,7 @@ private:
} // DoExecute()
void AfterExecuteAndWriteOutputs()
void AfterExecuteAndWriteOutputs() override
{
if (m_TemporaryFiles.size() > 0)
{
......
......@@ -28,9 +28,12 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++11-extensions"
#if defined(__apple_build_version__) && __apple_build_version__ < 7000053
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#else
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
......
......@@ -24,14 +24,25 @@
#include "itkMacro.h"
#include "otbMath.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winconsistent-missing-override"
#if defined(__clang__)
#pragma clang diagnostic push
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#include "mpParser.h"
#pragma GCC diagnostic pop
#pragma clang diagnostic pop
#else
#include "mpParser.h"
#endif
#include <vector>
namespace otb
......
......@@ -18,7 +18,7 @@
* limitations under the License.
*/
#include "itkMacro.h"
#include "otbMacro.h"
#include "otbParserXPlugins.h"
#include "otbMath.h"
......@@ -31,7 +31,7 @@ namespace otb
{
void bands::Eval(mup::ptr_val_type& ret, const mup::ptr_val_type* a_pArg, int a_iArgc)
void bands::Eval(mup::ptr_val_type& ret, const mup::ptr_val_type* a_pArg, int otbUseInDebug(a_iArgc) )
{
assert (a_iArgc == 2);
......
......@@ -296,7 +296,7 @@ int otbBandMathXImageFilter(int itkNotUsed(argc), char* itkNotUsed(argv)[])
}
// Sub-test 6
PixelType result = output6->GetPixel( {0, 0} );
PixelType result = output6->GetPixel( {{0, 0}} );
if (result[0] != 10 || std::abs(result[1] - 3.14) > 1e-12) {
itkGenericExceptionMacro(<< std::endl
<< " Expected = [10, 3.14]"
......
......@@ -127,7 +127,7 @@ protected:
}
/** Overrided methods */
virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
private:
InternalValueType m_FeatheringTransitionDistance; // feathering transition
......
......@@ -116,7 +116,7 @@ protected:
}
/** Overrided method */
virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
}; // end of class
......
......@@ -167,13 +167,13 @@ protected:
/**
* Methods
*/
virtual void GenerateOutputInformation(void);
void GenerateOutputInformation(void) override;
virtual void GenerateInputRequestedRegion(void);
void GenerateInputRequestedRegion(void) override;
virtual void AfterThreadedGenerateData();
void AfterThreadedGenerateData() override;
virtual void BeforeThreadedGenerateData();
void BeforeThreadedGenerateData() override;
/** Image extent computing */
virtual void ImageToExtent(InputImageType* image, InputImagePointType& extentInf, InputImagePointType& extentSup);
......
......@@ -100,11 +100,11 @@ protected:
}
/* Overrided methods */
virtual void AddUsedInputImageIndex(unsigned int inputImageIndex);
void AddUsedInputImageIndex(unsigned int inputImageIndex) override;
virtual unsigned int GetNumberOfInputImages();
unsigned int GetNumberOfInputImages() override;
virtual unsigned int GetUsedInputImageIndice(unsigned int i)
unsigned int GetUsedInputImageIndice(unsigned int i) override
{
return 0.5 * Superclass::GetUsedInputImageIndice(i);
}
......
......@@ -84,7 +84,7 @@ protected:
}
/** Overrided methods */
virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
private:
StreamingSimpleMosaicFilter(const Self&); // purposely not implemented
......
......@@ -96,13 +96,13 @@ public:
typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
/** Overrided methods */
virtual void AllocateOutputs();
virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
virtual void Reset();
virtual void Synthetize();
void AllocateOutputs() override;
void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
void Reset() override;
void Synthetize() override;
/** Make a DataObject of the correct type to be used as the specified output. */
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
using Superclass::MakeOutput;
/** Return the computed Mean. */
......@@ -432,7 +432,7 @@ protected:
/** Constructor */
StreamingStatisticsMosaicFilter(){};
/** Destructor */
~StreamingStatisticsMosaicFilter() ITK_OVERRIDE
~StreamingStatisticsMosaicFilter() override
{
}
......
......@@ -34,7 +34,16 @@
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#pragma clang diagnostic ignored "-Wdivision-by-zero"
#if defined(__apple_build_version__)
/* Need AppleClang >= 9.0.0 to support -Wexpansion-to-defined */
#if __apple_build_version__ >= 9000000
#pragma clang diagnostic ignored "-Wexpansion-to-defined"
#endif
#elif __clang_major__ > 3
#pragma clang diagnostic ignored "-Wexpansion-to-defined"
#endif
#else
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
......
......@@ -32,7 +32,16 @@
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#if defined(__apple_build_version__)
/* Need AppleClang >= 9.0.0 to support -Wexpansion-to-defined */
#if __apple_build_version__ >= 9000000
#pragma clang diagnostic ignored "-Wexpansion-to-defined"
#endif
#elif __clang_major__ > 3
#pragma clang diagnostic ignored "-Wexpansion-to-defined"
#endif
#else
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment