diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.txx b/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.txx index 7cc54d82d1b673cbfbb2a5efd7eb2adfbcd373ba..673ae0f9b29230a506a9ef0d9fac647da07807d8 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.txx +++ b/Modules/Adapters/GdalAdapters/include/otbOGRFieldWrapper.txx @@ -39,10 +39,14 @@ // #include "boost/type_traits/is_array.hpp" #include "boost/type_traits/is_contiguous.h" // from OTB actually +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" -#include "ogr_feature.h" // OGRFeature::*field_getters +#include "ogr_feature.h" // OGRFeature::*field_getters #pragma GCC diagnostic pop +#else +#include "ogr_feature.h" // OGRFeature::*field_getters +#endif #include "cpl_string.h" // CSLCount #include "otbOGRHelpers.h" diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx index 66febc9ac4681408374331007b98b4b075052d8e..7fc79a88c9c55de31ae70e560127c96ac837b70d 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRFeatureWrapper.cxx @@ -22,12 +22,14 @@ #include "otbOGRFeatureWrapper.h" #include <boost/bind.hpp> #include <boost/make_shared.hpp> - +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #include "ogr_feature.h" #pragma GCC diagnostic pop - +#else +#include "ogr_feature.h" +#endif #include "cpl_error.h" #include "itkMacro.h" diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx index 8a930ed4d317fd47005c2925e612fd172e9b9844..6942ef41a8b4f1916fd99592736d58468a4511f2 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx @@ -23,10 +23,15 @@ #include <cassert> #include <boost/bind.hpp> #include <boost/foreach.hpp> + +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #include "ogrsf_frmts.h" // OGRDataSource & OGRLayer #pragma GCC diagnostic pop +#else +#include "ogrsf_frmts.h" // OGRDataSource & OGRLayer +#endif #include "otbOGRDataSourceWrapper.h" diff --git a/Modules/Core/VectorDataBase/include/otbVectorDataKeywordlist.h b/Modules/Core/VectorDataBase/include/otbVectorDataKeywordlist.h index 0bd19040fc887a8e314dcc8407dbcd505cab8372..8b16fb5d70e0b8c069e1562abfe47708a6658bc6 100644 --- a/Modules/Core/VectorDataBase/include/otbVectorDataKeywordlist.h +++ b/Modules/Core/VectorDataBase/include/otbVectorDataKeywordlist.h @@ -21,10 +21,14 @@ #include "itkLightObject.h" #include "itkObjectFactory.h" #include <vector> +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #include "ogr_feature.h" #pragma GCC diagnostic pop +#else +#include "ogr_feature.h" +#endif namespace otb { diff --git a/Modules/IO/TestKernel/src/otbTestDriver.cxx b/Modules/IO/TestKernel/src/otbTestDriver.cxx index f121ad33805afadb0896d1c57c6bc5b8914db234..7372ee21aca6c52b8ab022be8204b38ffa4d3969 100644 --- a/Modules/IO/TestKernel/src/otbTestDriver.cxx +++ b/Modules/IO/TestKernel/src/otbTestDriver.cxx @@ -31,10 +31,15 @@ // include SharedForward to avoid duplicating the code which find the library path variable // name and the path separator +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" #include "itksys/SharedForward.h" #pragma GCC diagnostic pop +#else +#include "itksys/SharedForward.h" +#endif + #include "itksys/Process.h" // Temporary definition of otbTestMain diff --git a/Modules/IO/TestKernel/src/otbTestHelper.cxx b/Modules/IO/TestKernel/src/otbTestHelper.cxx index 21a33819306a34f491c357d64ec5877e854c1348..2b1e9f6cc3ba13cba5941c65eb5e9ca7247963fa 100644 --- a/Modules/IO/TestKernel/src/otbTestHelper.cxx +++ b/Modules/IO/TestKernel/src/otbTestHelper.cxx @@ -45,10 +45,15 @@ #include "cpl_string.h" #include "cpl_multiproc.h" #include "ogr_api.h" + +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #include "ogrsf_frmts.h" #pragma GCC diagnostic pop +#else +#include "ogrsf_frmts.h" +#endif #define otbPrintDiff(comment, refStr, testStr) \ std::cout << " ---- '" << comment << "' checking ---------------------------" << std::endl; \