diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx index 54fc19e190104557ee0f0c670507709924e6b5c9..b616fe752698e68c3731b5ef6bf822802468a33c 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx @@ -64,6 +64,7 @@ OTBGdalAdapters_EXPORT bool IsOFTInteger64(OGRFieldType type) GDALDatasetType * Open(const char * filename, bool readOnly , std::vector< std::string > const & options ) { #if GDAL_VERSION_NUM<2000000 + (void)options; return OGRSFDriverRegistrar::Open(filename,!readOnly); #else return (GDALDatasetType *)GDALOpenEx( @@ -87,6 +88,7 @@ void Close(GDALDatasetType * dataset) GDALDatasetType * Create(GDALDriverType * driver, const char * name , std::vector< std::string > const & options ) { #if GDAL_VERSION_NUM<2000000 + (void)options; GDALDatasetType * ds = driver->CreateDataSource(name); if(ds) diff --git a/Modules/Core/ObjectList/include/otbObjectList.h b/Modules/Core/ObjectList/include/otbObjectList.h index 7c3737c88d89d1c365e293de7fecb42163e93b53..80464782d4af1ccf21c9f93b13f406d4017831e6 100644 --- a/Modules/Core/ObjectList/include/otbObjectList.h +++ b/Modules/Core/ObjectList/include/otbObjectList.h @@ -72,7 +72,7 @@ public: * Get the number of elements in the vector. * \return The number of elements in the vector. */ - InternalContainerSizeType Size(void) const; + InternalContainerSizeType Size(void) const override; /** * Resize the maximal list capacity. * \param size The new maximal size of the list. @@ -104,7 +104,7 @@ public: * Get the nth element of the list as a DataObject *. * \param index The index of the object to get. */ - Superclass * GetNthDataObject(unsigned int index) const; + Superclass * GetNthDataObject(unsigned int index) const override; /** * Return the first element of the list. * \return The first element of the list. diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx index 4cf7c602e1f247a6c9836a50cea9587218b9e989..02ddfea8985acb5b67f29cbbf344139b5bcacc3f 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx @@ -30,7 +30,7 @@ namespace MetaDataHelper MDType GetType(const std::string &val) { - MDType ret; + MDType ret(MDType::String); otb::MetaDataKey::KeyType kt = otb::MetaDataKey::GetKeyType(val); switch (kt) { @@ -88,7 +88,7 @@ GetInt( const itk::MetaDataDictionary &dict, const std::string &key) { - unsigned int ret; + unsigned int ret=0; itk::ExposeMetaData<unsigned int>(dict, key, ret); return ret; } @@ -107,7 +107,7 @@ GetDouble( const itk::MetaDataDictionary &dict, const std::string &key) { - double ret; + double ret = 0.0; itk::ExposeMetaData<double>(dict, key, ret); return ret; } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx index 5d458d0f15109f9b5cf77b55b96cdea240e1ca6d..d19102fa8fe5bd21479caf4724941c7da5fd130a 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx @@ -331,7 +331,7 @@ AppliThread m_Application->GetLogger()->Fatal(string("Cannot open image ") + err.m_Filename + string(". ") + err.GetDescription() + string("\n")); emit ExceptionRaised( err.what() ); } - catch(itk::ProcessAborted& err) + catch(itk::ProcessAborted& /*err*/) { m_Application->GetLogger()->Info("Processing aborted\n"); }