Commit 6fcc483c authored by Victor Poughon's avatar Victor Poughon

Merge branch 'fix-warnings' into 'develop'

Fix current warnings on dashboard

See merge request !343
parents 73406694 56b3c5af
......@@ -114,4 +114,10 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
".*include.mpValue.h.*[Ww]arning.*\\[-Wc\\+\\+11-extensions\\]"
".*itksys.SharedForward.h.*warning.*itksys_shared_forward_to_real.*"
".*include.mpi_portable_platform.h.*warning.*invalid.suffix.on.literal.*"
# Silent latex warnings in ctest
".*LaTeX Warning:.*"
".*Package tabulary Warning:.*"
".*Package rerunfilecheck Warning:.*"
# Silent warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] from GCC 4.9
".*warning: unknown option after \\‘\\#pragma GCC diagnostic\\’ kind \\[-Wpragmas\\]"
)
set(CTEST_PROJECT_NAME "Documentation")
set(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "dash.orfeo-toolbox.org")
set(CTEST_DROP_LOCATION "/submit.php?project=Documentation")
set(CTEST_DROP_SITE_CDASH TRUE)
......@@ -37,9 +37,6 @@ def application_documentation_warnings(app):
for key in app.GetParametersKeys():
parameter_warnings(warn, app, key)
if "ram" in keys and not keys[-3] == "ram":
warn("'ram' parameter is not third from last")
if "inxml" in keys and not keys[-2] == "inxml":
warn("'inxml' parameter is not second from last parameter")
......
......@@ -24,7 +24,14 @@
/*===========================================================================*/
#define BOOST_TEST_MODULE "otb::org::DataSource creation unit testing"
#define BOOST_TEST_DYN_LINK
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <boost/test/unit_test.hpp>
#pragma GCC diagnostic pop
#else
#include <boost/test/unit_test.hpp>
#endif
#include <boost/foreach.hpp>
#include "otb_boost_string_header.h"
#include "itksys/SystemTools.hxx"
......
......@@ -96,25 +96,26 @@ private:
SetParameterDescription("ip","This group allows setting parameters for classification map regularization by Majority Voting.");
AddParameter(ParameterType_Int, "ip.radius", "Structuring element radius (in pixels)");
SetParameterDescription("ip.radius", "The radius of the ball shaped structuring element (expressed in pixels). By default, 'ip.radius = 1 pixel'.");
SetParameterDescription("ip.radius", "The radius of the ball shaped structuring element (in pixels).");
SetDefaultParameterInt("ip.radius", 1.0);
AddParameter(ParameterType_Bool, "ip.suvbool", "Multiple majority: Undecided(X)/Original");
SetParameterDescription("ip.suvbool", "Pixels with more than 1 majority class are marked as Undecided if this parameter is checked (true), or keep their Original labels otherwise (false). Please note that the Undecided value must be different from existing labels in the input labeled image. By default, 'ip.suvbool = false'.");
AddParameter(ParameterType_Bool, "ip.suvbool", "Set tie pixels to undecided");
SetParameterDescription("ip.suvbool",
"If true, set pixels with more than one majority class to an undecided value. If false, keep their original labels.");
AddParameter(ParameterType_Int, "ip.nodatalabel", "Label for the NoData class");
SetParameterDescription("ip.nodatalabel", "Label for the NoData class. Such input pixels keep their NoData label in the output image. By default, 'ip.nodatalabel = 0'.");
SetParameterDescription("ip.nodatalabel", "Label for the NoData class. Such input pixels keep their NoData label in the output image.");
SetDefaultParameterInt("ip.nodatalabel", 0.0);
AddParameter(ParameterType_Int, "ip.undecidedlabel", "Label for the Undecided class");
SetParameterDescription("ip.undecidedlabel", "Label for the Undecided class. By default, 'ip.undecidedlabel = 0'.");
SetParameterDescription("ip.undecidedlabel", "Label for the Undecided class.");
SetDefaultParameterInt("ip.undecidedlabel", 0.0);
AddParameter(ParameterType_Bool, "ip.onlyisolatedpixels", "Process isolated pixels only");
SetParameterDescription("ip.onlyisolatedpixels", "Only pixels whose label is unique in the neighbordhood will be processed. By default, 'ip.onlyisolatedpixels = false'.");
SetParameterDescription("ip.onlyisolatedpixels", "Only pixels whose label is unique in the neighbordhood will be processed.");
AddParameter(ParameterType_Int, "ip.isolatedthreshold", "Threshold for isolated pixels");
SetParameterDescription("ip.isolatedthreshold", "Maximum number of neighbours with the same label as the center pixel to consider that it is an isolated pixel. By default, 'ip.isolatedthreshold = 1'.");
SetParameterDescription("ip.isolatedthreshold", "Maximum number of neighbours with the same label as the center pixel to consider that it is an isolated pixel.");
SetDefaultParameterInt("ip.isolatedthreshold", 1);
......
......@@ -53,7 +53,7 @@ void TrainVectorBase::DoInit()
MandatoryOff( "layer" );
SetDefaultParameterInt( "layer", 0 );
AddParameter(ParameterType_ListView, "feat", "Field names for training features.");
AddParameter(ParameterType_ListView, "feat", "Field names for training features");
SetParameterDescription("feat",
"List of field names in the input vector data to be used as features for training.");
......
......@@ -61,7 +61,7 @@ private:
AddParameter(ParameterType_InputImage, "in", "Input image");
SetParameterDescription("in", "Input image");
AddParameter(ParameterType_OutputFilename, "out", "Output .kmz product");
AddParameter(ParameterType_OutputFilename, "out", "Output KMZ product");
SetParameterDescription("out", "Output Kmz product directory (with .kmz extension)");
AddParameter(ParameterType_Int, "tilesize", "Tile Size");
......
......@@ -148,16 +148,16 @@ public:
protected:
ImportVectorImageFilter();
virtual ~ImportVectorImageFilter();
void PrintSelf(std::ostream& os, itk::Indent indent) const;
void PrintSelf(std::ostream& os, itk::Indent indent) const override;
/** This filter does not actually "produce" any data, rather it "wraps"
* the user supplied data into an itk::Image. */
virtual void GenerateData();
void GenerateData() override;
/** This is a source, so it must set the spacing, size, and largest possible
* region for the output image that it will produce.
* \sa ProcessObject::GenerateOutputInformation() */
virtual void GenerateOutputInformation();
void GenerateOutputInformation() override;
/** This filter can only produce the amount of data that it is given,
* so we must override ProcessObject::EnlargeOutputRequestedRegion()
......@@ -166,7 +166,7 @@ protected:
* given.)
*
* \sa ProcessObject::EnlargeOutputRequestedRegion() */
virtual void EnlargeOutputRequestedRegion(itk::DataObject *output);
void EnlargeOutputRequestedRegion(itk::DataObject *output) override;
private:
ImportVectorImageFilter(const ImportVectorImageFilter &) = delete;
......
......@@ -228,8 +228,7 @@ LocalHoughFilter<TInputImage>
// ---------------------------------------
// Get the list of LineSpatialObject lines
// ---------------------------------------
#if !defined(ITK_LEGACY_REMOVE)
#if ITK_VERSION_MAJOR < 4 || (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR <= 12)
lines = houghFilter->GetLines(m_NumberOfLines);
#else
lines = houghFilter->GetLines();
......
......@@ -23,7 +23,15 @@
#include "itkMacro.h"
#include "otbMath.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winconsistent-missing-override"
#include "mpParser.h"
#pragma GCC diagnostic pop
#else
#include "mpParser.h"
#endif
#include <vector>
namespace otb
......
......@@ -129,7 +129,7 @@ RegionImageToRectangularPathListFilter<TInputImage, TOutputPath>
typedef typename TInputImage::IndexType IndexType;
std::vector<IndexType> regionContainer; // Pb for growing from within loop
typename std::vector<IndexType>::iterator regionIterator;
typename std::vector<IndexType>::iterator regionIterator2;
regionContainer.reserve(Taille[0] * Taille[1]); // to avoid growth problems
IndexType explorerIndex; // position whose neighbors are to be checked for inclusion in current region
......
......@@ -35,7 +35,15 @@
#include "otbGeographicalDistance.h"
#include "otbGenericRSTransform.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "ossim/projection/ossimProjection.h"
#pragma GCC diagnostic pop
#else
#include "ossim/projection/ossimProjection.h"
#endif
#include "ossim/projection/ossimSensorModelFactory.h"
#include "ossim/ossimPluginProjectionFactory.h"
......
......@@ -22,12 +22,23 @@
#include "otbKMLVectorDataIO.h"
#include <fstream>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "kml/dom.h"
#include "kml/dom/kml22.h"
#include "kml/base/file.h"
#include "kml/dom/kml_cast.h"
#include "kml/engine/kml_file.h"
#pragma GCC diagnostic pop
#else
#include "kml/dom.h"
#include "kml/dom/kml22.h"
#include "kml/base/file.h"
#include "kml/dom/kml_cast.h"
#include "kml/engine/kml_file.h"
#endif
#include "ogrsf_frmts.h"
......
......@@ -173,9 +173,6 @@ ImageFileWriter<TInputImage>
m_StreamingManager = streamingManager;
}
#ifndef ITK_LEGACY_REMOVE
#endif // ITK_LEGACY_REMOVE
/**
*
*/
......
......@@ -25,8 +25,16 @@
#include "itkObjectFactory.h"
//kmz creation
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "kml/engine/kmz_file.h"
#include "kml/base/file.h"
#pragma GCC diagnostic pop
#else
#include "kml/engine/kmz_file.h"
#include "kml/base/file.h"
#endif
// Image Tiling
#include "otbMultiChannelExtractROI.h"
......
......@@ -98,7 +98,6 @@ DecisionTree<AttributeValueType, LabelType>
otbMsgDevMacro( << "Trying to match attribute " << m_Attribute << " with value " << attrValue );
bool found = false;
KeyType key;
if( m_IsFinal )
{
typename LabelMapType::const_iterator lmIt = m_LabelMap.begin();
......
......@@ -21,15 +21,15 @@
#ifndef otbOpenCVUtils_h
#define otbOpenCVUtils_h
#include <opencv2/core/core_c.h>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
#include <opencv2/core/core.hpp>
#include <opencv2/core/core_c.h>
#pragma GCC diagnostic pop
#else
#include <opencv2/core/core.hpp>
#include <opencv2/core/core_c.h>
#endif
#if defined(__GNUC__) || defined(__clang__)
......
......@@ -201,9 +201,6 @@ SimpleParallelTiffWriter<TInputImage>
m_StreamingManager = streamingManager;
}
#ifndef ITK_LEGACY_REMOVE
#endif // ITK_LEGACY_REMOVE
/**
*
*/
......
Markdown is supported
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