Commit 311a1bfa authored by Laurențiu Nicola's avatar Laurențiu Nicola
Browse files

COMP: Fix some ossim warnings

parent 46c54d2d
......@@ -30,6 +30,7 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
......@@ -309,7 +310,7 @@ ImageKeywordlist ReadGeometryFromImage(const std::string& filename, bool checkRp
ImageKeywordlist ReadGeometryFromGEOMFile(const std::string& filename)
{
ossimKeywordlist geom_kwl;
// ossimKeywordlist geom_kwl;
ImageKeywordlist otb_kwl;
ossimFilename ossimGeomFile = ossimFilename(filename);
......@@ -332,11 +333,17 @@ ImageKeywordlist ReadGeometryFromGEOMFile(const std::string& filename)
// {
// geom_kwl = kwl;
// }
geom_kwl = kwl;
otb_kwl.SetKeywordlist(kwl);
}
else
{
otb_kwl.SetKeywordlist(ossimKeywordlist());
}
}
otb_kwl.SetKeywordlist(geom_kwl);
else
{
otb_kwl.SetKeywordlist(ossimKeywordlist());
}
return otb_kwl;
}
......@@ -456,7 +463,7 @@ void WriteGeometry(const ImageKeywordlist& otb_kwl, const std::string& filename)
}
}
bool ImageKeywordlist::ReadGeometry(const std::string & path)
bool ImageKeywordlist::ReadGeometry(const std::string & /*path*/)
{
// The geom files used in OTB are simpler than what OSSIM actually supports
// It is basically a list of 'key: value' lines
......@@ -467,7 +474,7 @@ bool ImageKeywordlist::ReadGeometry(const std::string & path)
return false;
}
void ImageKeywordlist::WriteGeometry(const std::string& filename) const
void ImageKeywordlist::WriteGeometry(const std::string& /*filename*/) const
{
// Write the image keyword list if any (without using ossimKeywordlist)
// values in the keywordlist matching the regex '\n|\r| $|^ ' must be
......
......@@ -27,6 +27,7 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
......
......@@ -27,6 +27,8 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
......
......@@ -26,6 +26,7 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
......
......@@ -27,6 +27,7 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
......
......@@ -25,6 +25,7 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wshadow"
......
......@@ -36,7 +36,7 @@ GeomMetadataSupplier::GeomMetadataSupplier(std::string const& fileName)
this->ReadGeomFile();
}
std::string GeomMetadataSupplier::GetMetadataValue(std::string const& path, bool& hasValue, int band) const
std::string GeomMetadataSupplier::GetMetadataValue(std::string const& path, bool& hasValue, int /*band*/) const
{
auto value = this->m_MetadataDic.find(path);
if(value != this->m_MetadataDic.end())
......@@ -48,7 +48,7 @@ std::string GeomMetadataSupplier::GetMetadataValue(std::string const& path, bool
return "";
}
std::string GeomMetadataSupplier::GetResourceFile(std::string const& s) const
std::string GeomMetadataSupplier::GetResourceFile(std::string const& /*s*/) const
{
return this->m_FileName;
}
......
......@@ -36,7 +36,7 @@ XMLMetadataSupplier::XMLMetadataSupplier(const std::string & fileName)
CPLDestroyXMLNode(psNode);
}
std::string XMLMetadataSupplier::GetMetadataValue(std::string const& path, bool& hasValue, int band) const
std::string XMLMetadataSupplier::GetMetadataValue(std::string const& path, bool& hasValue, int /*band*/) const
{
const char * ret = CSLFetchNameValue(m_MetadataDic, path.c_str());
if (ret)
......@@ -83,7 +83,7 @@ std::string XMLMetadataSupplier::GetFirstMetadataValue(std::string const& path,
}
}
std::string XMLMetadataSupplier::GetResourceFile(std::string const& s) const
std::string XMLMetadataSupplier::GetResourceFile(std::string const& /*s*/) const
{
return m_FileName;
}
......
......@@ -28,6 +28,7 @@
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
......
......@@ -33,6 +33,7 @@
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
# pragma GCC diagnostic ignored "-Wshadow"
......
......@@ -30,6 +30,18 @@
#include <string>
#include <boost/config.hpp>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#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
#endif
#include "ossimPluginConstants.h" // OSSIM_PLUGINS_DLL
#include <ossim/base/ossimCommon.h>
......@@ -45,6 +57,10 @@
#include <ossim/support_data/ossimSupportFilesList.h>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif
//#include "ossimGeometricSarSensorModel.h"
class OSSIMDLLEXPORT ossimXmlNode;
......@@ -139,9 +155,15 @@ namespace ossimplugins
void setMetadataDirectory(ossimFilename const& d)
{
theManifestDirectory = d;
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
theManifestDirectory = d;
#pragma GCC diagnostic pop
#endif
}
protected:
protected:
#if defined(__clang__)
#pragma clang diagnostic push
......
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