From c4e3aa638af9903e605dd1a8ea3c93e86e032118 Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@cnes.fr> Date: Thu, 30 Aug 2018 11:36:55 +0200 Subject: [PATCH] WRG: fix more warnings with gcc 8 --- Examples/Filtering/CompositeFilterExample.cxx | 2 +- Modules/Filtering/Path/test/otbImageToEdgePathFilter.cxx | 2 +- Modules/IO/Carto/src/otbPlaceNameToLonLat.cxx | 2 +- Modules/IO/Carto/test/otbImageToOSMVectorDataGenerator.cxx | 2 +- Modules/IO/Carto/test/otbOSMDataToVectorDataTests.cxx | 2 +- .../DempsterShafer/include/otbStandardDSCostFunction.hxx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Examples/Filtering/CompositeFilterExample.cxx b/Examples/Filtering/CompositeFilterExample.cxx index e5acdaec6c..b4c3b77fec 100644 --- a/Examples/Filtering/CompositeFilterExample.cxx +++ b/Examples/Filtering/CompositeFilterExample.cxx @@ -287,7 +287,7 @@ int main(int argc, char* argv[]) { writer->Update(); } - catch (itk::ExceptionObject e) + catch ( itk::ExceptionObject & e ) { std::cerr << "Error: " << e << std::endl; } diff --git a/Modules/Filtering/Path/test/otbImageToEdgePathFilter.cxx b/Modules/Filtering/Path/test/otbImageToEdgePathFilter.cxx index c833e3627c..19a0819160 100644 --- a/Modules/Filtering/Path/test/otbImageToEdgePathFilter.cxx +++ b/Modules/Filtering/Path/test/otbImageToEdgePathFilter.cxx @@ -30,7 +30,7 @@ int otbImageToEdgePathFilter(int itkNotUsed(argc), char * argv[]) { const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - const unsigned int foreground((const unsigned int) ::atoi(argv[3])); + const unsigned int foreground = atoi(argv[3]); const unsigned int Dimension = 2; typedef unsigned char PixelType; diff --git a/Modules/IO/Carto/src/otbPlaceNameToLonLat.cxx b/Modules/IO/Carto/src/otbPlaceNameToLonLat.cxx index d3ce1201be..303b042925 100644 --- a/Modules/IO/Carto/src/otbPlaceNameToLonLat.cxx +++ b/Modules/IO/Carto/src/otbPlaceNameToLonLat.cxx @@ -107,7 +107,7 @@ void PlaceNameToLonLat::RetrieveXML(const std::ostringstream& urlStream) m_RequestSucceed = true; m_Curl->RetrieveUrlInMemory(urlStream.str(), m_CurlOutput); } - catch(itk::ExceptionObject) + catch( itk::ExceptionObject & err ) { m_RequestSucceed = false; } diff --git a/Modules/IO/Carto/test/otbImageToOSMVectorDataGenerator.cxx b/Modules/IO/Carto/test/otbImageToOSMVectorDataGenerator.cxx index 2f1291139c..b3d8251bd1 100644 --- a/Modules/IO/Carto/test/otbImageToOSMVectorDataGenerator.cxx +++ b/Modules/IO/Carto/test/otbImageToOSMVectorDataGenerator.cxx @@ -57,7 +57,7 @@ int otbImageToOSMVectorDataGenerator(int argc, char * argv[]) { parser->ParseCommandLine(argc, argv, parseResult); } - catch ( itk::ExceptionObject ) + catch ( itk::ExceptionObject & err ) { return EXIT_FAILURE; } diff --git a/Modules/IO/Carto/test/otbOSMDataToVectorDataTests.cxx b/Modules/IO/Carto/test/otbOSMDataToVectorDataTests.cxx index 8e646f60c6..f0ab54d241 100644 --- a/Modules/IO/Carto/test/otbOSMDataToVectorDataTests.cxx +++ b/Modules/IO/Carto/test/otbOSMDataToVectorDataTests.cxx @@ -65,7 +65,7 @@ int otbOSMToVectorDataGeneratorByName (int argc, char * argv[]) { parser->ParseCommandLine(argc, argv, parseResult); } - catch ( itk::ExceptionObject ) + catch ( itk::ExceptionObject & err ) { return EXIT_FAILURE; } diff --git a/Modules/Learning/DempsterShafer/include/otbStandardDSCostFunction.hxx b/Modules/Learning/DempsterShafer/include/otbStandardDSCostFunction.hxx index 4829d1b557..002c20e28c 100644 --- a/Modules/Learning/DempsterShafer/include/otbStandardDSCostFunction.hxx +++ b/Modules/Learning/DempsterShafer/include/otbStandardDSCostFunction.hxx @@ -80,7 +80,7 @@ typename StandardDSCostFunction<TDSValidationFilter> { internalFunctionGT->SetDescriptorModels(descModel); } - catch (itk::ExceptionObject /*& err*/) + catch ( itk::ExceptionObject & err ) { return 1; } -- GitLab