Commit 2a4858ea authored by Rashad Kanavath's avatar Rashad Kanavath

WRG: warnings with OTB_COMPILE_WITH_FULL_WARNING=ON corrected. Excluding Utilities/*

parent d5f573f0
......@@ -67,8 +67,6 @@ GDALDriverManagerWrapper::GDALDriverManagerWrapper()
{
GDALAllRegister();
GDALDriver* driver = 0;
// Ignore incompatible Jpeg2000 drivers (Jasper)
/*
driver = GetGDALDriverManager()->GetDriverByName( "JPEG2000" );
......@@ -77,6 +75,9 @@ GDALDriverManagerWrapper::GDALDriverManagerWrapper()
*/
#ifndef CHECK_HDF4OPEN_SYMBOL
GDALDriver* driver = 0;
// Get rid of the HDF4 driver when it is buggy
driver = GetGDALDriverManager()->GetDriverByName( "hdf4" );
if (driver)
......
......@@ -98,7 +98,7 @@ inline
void otb::TransformationFunctorDispatcher<TransformationFunctor,OGRGeometry,FieldTransformationPolicy>::operator()(
otb::ogr::Layer & inout) const
{
OGRFeatureDefn & defn = inout.GetLayerDefn();
// OGRFeatureDefn & defn = inout.GetLayerDefn();
// NB: We can't iterate with begin()/end() as SetFeature may invalidate the
// iterators depending of the underlying drivers
// => we use start_at(), i.e. SetNextByIndex()
......
......@@ -148,7 +148,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
bool
BoostMachineLearningModel<TInputValue,TOutputValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -153,7 +153,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
bool
DecisionTreeMachineLearningModel<TInputValue,TOutputValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -150,7 +150,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
bool
GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -84,7 +84,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
template <class TInputValue, class TTargetValue>
void
KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
::Save(const std::string & filename, const std::string & name)
::Save(const std::string & filename, const std::string & itkNotUsed(name))
{
//there is no m_KNearestModel->save(filename.c_str(), name.c_str()).
//We need to save the K parameter and IsRegression flag used and the samples.
......@@ -117,7 +117,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
template <class TInputValue, class TTargetValue>
void
KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
::Load(const std::string & filename, const std::string & name)
::Load(const std::string & filename, const std::string & itkNotUsed(name))
{
//there is no m_KNearestModel->load(filename.c_str(), name.c_str());
std::ifstream ifs(filename.c_str());
......@@ -203,7 +203,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
template <class TInputValue, class TTargetValue>
bool
KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -278,7 +278,7 @@ bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanReadFile(c
}
template<class TInputValue, class TOutputValue>
bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanWriteFile(const std::string & file)
bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -133,7 +133,7 @@ NormalBayesMachineLearningModel<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
bool
NormalBayesMachineLearningModel<TInputValue,TOutputValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -178,7 +178,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
bool
RandomForestsMachineLearningModel<TInputValue,TOutputValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -179,7 +179,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
bool
SVMMachineLearningModel<TInputValue,TOutputValue>
::CanWriteFile(const std::string & file)
::CanWriteFile(const std::string & itkNotUsed(file))
{
return false;
}
......
......@@ -63,7 +63,7 @@ void QtWidgetParameterBase::UpdateGUI()
}
}
void QtWidgetParameterBase::ParameterChanged(const QString& key)
void QtWidgetParameterBase::ParameterChanged(const QString& itkNotUsed(key))
{
m_Param->SetUserValue(true);
}
......
......@@ -56,7 +56,7 @@ void QtWidgetProgressReport::SetApplication(Application::Pointer app)
}
void
QtWidgetProgressReport::ProcessEvent( itk::Object * caller,
QtWidgetProgressReport::ProcessEvent( itk::Object * itkNotUsed(caller),
const itk::EventObject & event )
{
if( typeid( otb::Wrapper::AddProcessToWatchEvent ) == typeid( event ) )
......
......@@ -63,7 +63,7 @@ void QtWidgetSimpleProgressReport::SetApplication(Application::Pointer app)
}
void
QtWidgetSimpleProgressReport::ProcessEvent( itk::Object * caller,
QtWidgetSimpleProgressReport::ProcessEvent( itk::Object * itkNotUsed(caller),
const itk::EventObject & event )
{
if( typeid( otb::Wrapper::AddProcessToWatchEvent ) == typeid( event ) )
......
......@@ -88,7 +88,6 @@ int main( int argc, char* argv[])
typedef otb::VectorImage<PixelType, 2> InputImageType;
typedef otb::Image<PixelType, 2> OutputImageType;
typedef otb::ImageList<OutputImageType> ImageListType;
typedef OutputImageType::PixelType VPixelType;
typedef otb::VectorImageToImageListFilter<InputImageType, ImageListType>
VectorImageToImageListType;
typedef otb::ImageFileReader<InputImageType> ReaderType;
......
......@@ -46,7 +46,7 @@
#include "itkTimeProbe.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
// Software Guide : BeginLatex
//
......
......@@ -34,7 +34,7 @@
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const char * infname = argv[1];
const char * outfname = argv[2];
......
......@@ -38,7 +38,7 @@
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const char * infname = argv[1];
const char * somfname = argv[2];
......
......@@ -91,7 +91,6 @@ int main(int argc, char * argv[])
adaptor->SetImage(reader->GetOutput());
// Define the Measurement vector type from the AdaptorType
typedef AdaptorType::MeasurementVectorType MeasurementVectorType;
// Create the K-d tree structure
typedef itk::Statistics::WeightedCentroidKdTreeGenerator<
......
......@@ -44,7 +44,7 @@
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const char * infname = argv[1];
const char * modelfname = argv[2];
......
......@@ -43,7 +43,7 @@
#include "otbImageFileWriter.h"
#include "otbImage.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const char * inputFilename = argv[1];
......
......@@ -53,7 +53,7 @@
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
......
......@@ -65,7 +65,7 @@
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
......
......@@ -47,7 +47,7 @@
#include "otbMaximumAutocorrelationFactorImageFilter.h"
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
char * infname = argv[1];
char * outfname = argv[2];
......
......@@ -66,7 +66,7 @@
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
......
......@@ -43,7 +43,7 @@
#include "otbPCAImageFilter.h"
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
......
......@@ -73,8 +73,6 @@ int main(int argc, char** argv)
typedef double PixelType;
typedef itk::Vector<double, ImageDimension> DisplacementPixelType;
typedef double CoordinateRepresentationType;
typedef unsigned char OutputPixelType;
typedef otb::Image<OutputPixelType, ImageDimension> OutputImageType;
......
......@@ -67,8 +67,6 @@ int main(int argc, char** argv)
typedef double PixelType;
typedef itk::Vector<double, ImageDimension> DisplacementPixelType;
typedef double CoordinateRepresentationType;
typedef unsigned char OutputPixelType;
typedef otb::Image<OutputPixelType, ImageDimension> OutputImageType;
......
......@@ -159,10 +159,6 @@ int main(int argc, char* argv[])
// Software Guide : EndCodeSnippet
typedef PointSetType::PointType PointType;
typedef PointSetType::PointsContainer::Iterator PointSetIteratorType;
typedef PointSetType::PointsContainer PointsContainerType;
typedef PointSetType::PointDataContainer::Iterator PointDataIteratorType;
typedef PointSetType::PointDataContainer PointDataContainerType;
// Software Guide : BeginLatex
//
......
......@@ -76,12 +76,6 @@ int main(int argc, char* argv[])
typedef otb::Image<float,2> FloatImageType;
typedef otb::VectorImage<float,2> FloatVectorImageType;
typedef otb::ImageList<FloatImageType> ImageListType;
typedef otb::ImageListToVectorImageFilter
<ImageListType,
FloatVectorImageType> ImageListToVectorImageFilterType;
typedef otb::ImageFileReader
<FloatImageType> ImageReaderType;
......@@ -274,7 +268,7 @@ int main(int argc, char* argv[])
#else
std::string leftExpr = "if(inleft != 0,255,0)";
#endif
m_LBandMathFilter->SetExpression(leftExpr);
BandMathFilterType::Pointer m_RBandMathFilter = BandMathFilterType::New();
......
......@@ -56,8 +56,6 @@ int main(int argc, char * argv[])
unsigned int P((unsigned char) ::atoi(argv[1]));
unsigned int Q((unsigned char) ::atoi(argv[2]));
typedef unsigned char InputPixelType;
// Software Guide : BeginLatex
//
// The \doxygen{otb}{ComplexMomentPathFunction} is templated over the
......
......@@ -59,7 +59,7 @@
#include "otbBinaryImageDensityFunction.h"
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
const char * infname = argv[1];
......
......@@ -73,7 +73,7 @@
// 228 316 207 282 0.00005 1.0
// Software Guide : EndCommandLineArgs
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const unsigned int Dimension = 2;
......@@ -82,7 +82,6 @@ int main(int argc, char * argv[])
typedef itk::CovariantVector<PixelType, Dimension> VectorPixelType;
typedef otb::Image<PixelType, Dimension> InternalImageType;
typedef otb::VectorImage<PixelType, Dimension> MultiSpectralImageType;
typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
typedef otb::Image<VectorPixelType, Dimension> VectorImageType;
typedef otb::PolyLineParametricPathWithValue<double, Dimension> PathType;
......
......@@ -88,8 +88,6 @@ int main(int argc, char * argv[])
typedef otb::Image<OutputPixelType, 2> OutputImageType;
// Software Guide : EndCodeSnippet
typedef otb::LineSpatialObjectList LinesListType;
// Software Guide : BeginLatex
//
// The filter can be instantiated using the image types defined above.
......
......@@ -78,8 +78,6 @@ int main(int argc, char * argv[])
typedef otb::Image<OutputPixelType, 2> OutputImageType;
// Software Guide : EndCodeSnippet
typedef otb::LineSpatialObjectList LinesListType;
// Software Guide : BeginLatex
//
// The filter can be instantiated using the image types defined above.
......
......@@ -45,7 +45,7 @@
#include "otbSFSTexturesImageFilter.h"
// Software Guide : EndCodeSnippet
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
typedef double PixelType;
const unsigned int Dimension = 2;
......
......@@ -48,7 +48,7 @@
#include "itkImageDuplicator.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
typedef float InputPixelType;
......
......@@ -50,7 +50,7 @@
#include "itkImageDuplicator.h"
#include "otbObjectList.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
typedef float InputPixelType;
......
......@@ -211,16 +211,11 @@ int main(int argc, char *argv[])
typedef otb::VectorRescaleIntensityImageFilter<OutputImageType,
OutputVectorImageType>
VectorRescalerBayesianType;
typedef otb::Image<OutputPixelType2,
Dimension>
PanchroOutputImageType;
typedef otb::ImageToVectorImageCastFilter<PanchroImageType,
MultiSpecImageType> CasterType;
typedef otb::MultiChannelExtractROI<OutputPixelType2,
OutputPixelType2>
ChannelExtractorType;
typedef otb::ImageFileWriter<PanchroOutputImageType>
WriterType2;
multiSpectReader->GenerateOutputInformation();
multiSpectInterpReader->GenerateOutputInformation();
......
......@@ -60,8 +60,6 @@ int main(int argc, char * argv[])
const unsigned int Dimension = 2;
typedef double PixelType;
typedef otb::VectorImage<unsigned char, 2> OutputPrettyImageType;
// Software Guide : BeginLatex
//
// We start by defining the types for the images and the reader and
......@@ -78,12 +76,8 @@ int main(int argc, char * argv[])
// Software Guide : EndCodeSnippet
typedef otb::VectorRescaleIntensityImageFilter<ImageType, ImageType> RescalerType;
typedef otb::StreamingStatisticsVectorImageFilter<ImageType> StreamingStatisticsVectorImageFilterType;
typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
typedef vnl_vector<double> VectorType;
typedef vnl_matrix<double> MatrixType;
// Software Guide : BeginLatex
//
// We instantiate now the image reader and we set the image file name.
......
......@@ -49,7 +49,7 @@
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
// Software Guide : EndCodeSnippet
......
......@@ -43,7 +43,7 @@
#include "otbImage.h"
#include "otbImageFileReader.h"
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
// Verify the number of parameters in the command line
......
......@@ -122,11 +122,8 @@ int main(int argc, char * argv[])
// Software Guide : BeginCodeSnippet
typedef otb::Polygon<double> PolygonType;
typedef PolygonType::VertexListConstIteratorType PolygonIteratorType;
typedef otb::ObjectList<PolygonType> PolygonListType;
typedef PolygonListType::Iterator PolygonListIteratorType;
PolygonListType::Pointer polygonList = PolygonListType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......
......@@ -89,7 +89,6 @@ int main(int argc, char *argv[])
typedef Image4DType::IndexType Index4DType;
typedef Image4DType::SizeType Size4DType;
typedef Image4DType::RegionType Region4DType;
typedef Image4DType::SpacingType Spacing4DType;
typedef Image4DType::PointType Origin4DType;
......
......@@ -77,7 +77,7 @@
#include "otbImageFileWriter.h"
#include "itkListSample.h"
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
const char * inputFileName = argv[1];
const char * outputFileName = argv[2];
......
......@@ -64,7 +64,6 @@ int main(int argc, char* argv[])
const char * outputFilename = argv[2];
typedef double PixelType;
typedef std::vector<PixelType> VectorType;
typedef int LabelPixelType;
const unsigned int Dimension = 2;
......
......@@ -82,7 +82,6 @@ int main(int argc, char* argv[])
// Software Guide : BeginCodeSnippet
typedef double PixelType;
typedef std::vector<PixelType> VectorType;
typedef int LabelPixelType;
// Software Guide : EndCodeSnippet
const unsigned int Dimension = 2;
......
......@@ -63,7 +63,7 @@
#include "otbImageFileReader.h"
int main(int argc, char *argv[])
int main(int itkNotUsed(argc), char *argv[])
{
const char* inputImageFileName = argv[1];
......
......@@ -53,7 +53,7 @@
#include "otbImageFileReader.h"
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
const char* inputImageFileName = argv[1];
......
......@@ -46,7 +46,7 @@
#include "otbSVMClassifier.h"
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
// Software Guide : BeginLatex
//
......@@ -76,8 +76,6 @@ int main(int argc, char* argv[])
// Software Guide : BeginCodeSnippet
typedef itk::PointSet<InputVectorType, Dimension> MeasurePointSetType;
typedef itk::PointSet<LabelPixelType, Dimension> LabelPointSetType;
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......@@ -91,10 +89,7 @@ int main(int argc, char* argv[])
// Software Guide : BeginCodeSnippet
typedef MeasurePointSetType::PointType MeasurePointType;
typedef LabelPointSetType::PointType LabelPointType;
typedef MeasurePointSetType::PointsContainer MeasurePointsContainer;
typedef LabelPointSetType::PointsContainer LabelPointsContainer;
MeasurePointSetType::Pointer tPSet = MeasurePointSetType::New();
MeasurePointsContainer::Pointer tCont = MeasurePointsContainer::New();
......
......@@ -27,7 +27,7 @@
#include "itkListSample.h"
#include "otbSVMClassifier.h"
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* itkNotUsed(argv)[])
{
typedef float InputPixelType;
......
......@@ -36,7 +36,7 @@
#include "otbSVMPointSetModelEstimator.h"
// Software Guide : EndCodeSnippet
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* itkNotUsed(argv)[])
{
// Software Guide : BeginLatex
......
......@@ -52,7 +52,7 @@
//#include "otbShiftScaleSampleListFilter.h"
int main(int argc, char* argv[])
int main(int itkNotUsed(argc), char* argv[])
{
const char* inputImageFileName = argv[1];
const char* trainingShpFileName = argv[2];
......@@ -60,13 +60,8 @@ int main(int argc, char* argv[])
typedef unsigned int InputPixelType;
const unsigned int Dimension = 2;
typedef otb::VectorImage<InputPixelType, Dimension> InputImageType;
typedef otb::Image<InputImageType::InternalPixelType, 2> ImageType;
typedef otb::VectorData<double, 2> VectorDataType;
typedef otb::ImageFileReader<InputImageType> InputReaderType;
typedef otb::VectorDataFileReader<VectorDataType> VectorDataReaderType;
......@@ -189,4 +184,3 @@ int main(int argc, char* argv[])
// Software Guide : EndLatex
}
......@@ -76,7 +76,7 @@ int main(int argc, char* argv[])
int nbClasses = 4;
// Software Guide : EndCodeSnippet
unsigned int inputSeed = 121212;
// unsigned int inputSeed = 121212;
const char* outputModelFileName = argv[1]; //argv[5];
......@@ -180,4 +180,3 @@ int main(int argc, char* argv[])
// Software Guide : EndCodeSnippet
}
......@@ -73,7 +73,7 @@
#include "otbImage.h"
#include "itkMacro.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const char* inputFilename = argv[1];
......
......@@ -49,7 +49,7 @@
#include "itkUnaryFunctorImageFilter.h"
#include "itkScalarToRGBPixelFunctor.h"
int main(int argc, char * argv[])
int main(int itkNotUsed(argc), char * argv[])
{
const char* inputFilename = argv[1];
......
......@@ -71,8 +71,6 @@ int main(int argc, char * argv[])
typedef itk::StatisticsLabelMapFilter<LabelMapType,
IType> LabelObjectValuatorType;
typedef LabelObjectType::AttributeType
AttributeType;
typedef itk::StatisticsKeepNObjectsLabelMapFilter<LabelMapType>
KeepNObjectsType;
typedef itk::LabelMapToLabelImageFilter<LabelMapType,
......
......@@ -106,15 +106,7 @@ int main(int argc, char * argv[])
typedef itk::LabelImageToLabelMapFilter<LabeledImageType,
LabelMapType>
LabelMapFilterType;
typedef otb::Polygon<double>
PolygonType;
typedef otb::Functor::LabelObjectToPolygonFunctor<LabelObjectType,
PolygonType> FunctorType;
// Software Guide : EndCodeSnippet
typedef VectorDataType::DataNodeType DataNodeType;
typedef otb::VectorDataProjectionFilter<VectorDataType,
VectorDataType> VectorDataFilterType;
// Software Guide : EndCodeSnippet
LabeledReaderType::Pointer lreader = LabeledReaderType::New();
WriterType::Pointer writer = WriterType::New();
......
......@@ -113,9 +113,6 @@ int main(int argc, char * argv[])
LabelMapFilterType;
typedef otb::ShapeAttributesLabelMapFilter<LabelMapType>
ShapeLabelMapFilterType;
typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType,
ImageType>
StatisticsLabelMapFilterType;
typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType,
VectorImageType>
RadiometricLabelMapFilterType;
......
......@@ -109,8 +109,6 @@ public:
ArrayType GetUniqueValues() const